CPPLapack
 All Classes Files Functions Variables Friends
dsymatrix-double.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! dsymatrix*=double operator */
00003 inline dsymatrix& dsymatrix::operator*=(const double& d)
00004 {VERBOSE_REPORT;
00005   for(long i=0; i<n; i++){
00006     for(long j=0; j<=i; j++){
00007       darray[j][i] *=d;
00008     }
00009   }
00010   
00011   return *this;
00012 }
00013 
00014 //=============================================================================
00015 /*! dsymatrix/=double operator */
00016 inline dsymatrix& dsymatrix::operator/=(const double& d)
00017 {VERBOSE_REPORT;
00018   for(long i=0; i<n; i++){
00019     for(long j=0; j<=i; j++){
00020       darray[j][i] /=d;
00021     }
00022   }
00023   return *this;
00024 }
00025 
00026 ///////////////////////////////////////////////////////////////////////////////
00027 ///////////////////////////////////////////////////////////////////////////////
00028 ///////////////////////////////////////////////////////////////////////////////
00029 
00030 //=============================================================================
00031 /*! dsymatrix*double operator */
00032 inline _dsymatrix operator*(const dsymatrix& mat, const double& d)
00033 {VERBOSE_REPORT;
00034   dsymatrix newmat(mat.n);
00035   for(long i=0; i<mat.n; i++){
00036     for(long j=0; j<=i; j++){
00037       newmat.darray[j][i] =mat.darray[j][i]*d;
00038     }
00039   }
00040   
00041   return _(newmat);
00042 }
00043 
00044 //=============================================================================
00045 /*! dsymatrix/double operator */
00046 inline _dsymatrix operator/(const dsymatrix& mat, const double& d)
00047 {VERBOSE_REPORT;
00048   dsymatrix newmat(mat.n);
00049   for(long i=0; i<mat.n; i++){
00050     for(long j=0; j<=i; j++){
00051       newmat.darray[j][i] =mat.darray[j][i]/d;
00052     }
00053   }
00054   
00055   return _(newmat);
00056 }
 All Classes Files Functions Variables Friends