CPPLapack
 All Classes Files Functions Variables Friends
dsymatrix-cast.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! cast to _zhematrix */
00003 inline _zhematrix dsymatrix::to_zhematrix() const
00004 {VERBOSE_REPORT;
00005   zhematrix newmat(n);
00006   for(long i=0; i<n; i++){
00007     for(long j=0; j<=i; j++){
00008       newmat(i,j) =comple((*this)(i,j),0.0);
00009     }
00010   }
00011   
00012   return _(newmat);
00013 }
00014 
00015 ///////////////////////////////////////////////////////////////////////////////
00016 ///////////////////////////////////////////////////////////////////////////////
00017 ///////////////////////////////////////////////////////////////////////////////
00018 
00019 //=============================================================================
00020 /*! convert to _dgematrix */
00021 inline _dgematrix dsymatrix::to_dgematrix() const
00022 {VERBOSE_REPORT;
00023   dgematrix newmat(n,n);
00024   for(long i=0; i<n; i++){
00025     for(long j=0; j<n; j++){
00026       newmat(i,j) =(*this)(i,j);
00027     }
00028   }
00029   
00030   return _(newmat);
00031 }
00032 
00033 //=============================================================================
00034 /*! convert to _dssmatrix */
00035 inline _dssmatrix dsymatrix::to_dssmatrix(const double eps) const
00036 {VERBOSE_REPORT;
00037   dssmatrix newmat(n);
00038   for(long i=0; i<n; i++){
00039     for(long j=0; j<=i; j++){
00040       if( fabs((*this)(i,j))>eps ){ newmat(i,j) =(*this)(i,j); }
00041     }
00042   }
00043   
00044   return _(newmat);
00045 }
 All Classes Files Functions Variables Friends