CPPLapack
 All Classes Files Functions Variables Friends
dgsmatrix-cast.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! cast to _zgsmatrix */
00003 inline _zgsmatrix dgsmatrix::to_zgsmatrix() const
00004 {VERBOSE_REPORT;
00005   zgsmatrix newmat(m,n,data.size());
00006   for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){
00007     newmat.put(it->i, it->j, comple(it->v,0.));
00008   }
00009   return _(newmat);
00010 }
00011 
00012 ///////////////////////////////////////////////////////////////////////////////
00013 ///////////////////////////////////////////////////////////////////////////////
00014 ///////////////////////////////////////////////////////////////////////////////
00015 
00016 //=============================================================================
00017 /*! convert to _dgematrix */
00018 inline _dgematrix dgsmatrix::to_dgematrix() const
00019 {VERBOSE_REPORT;
00020   dgematrix newmat(m,n);
00021   newmat.zero();
00022   for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){
00023     newmat(it->i,it->j) = it->v;
00024   }
00025   return _(newmat);
00026 }
 All Classes Files Functions Variables Friends