00001 //============================================================================= 00002 /*! cast to _zgsmatrix */ 00003 inline _zgsmatrix _dgsmatrix::to_zgsmatrix() const 00004 {VERBOSE_REPORT; 00005 zgsmatrix newmat(m,n,data.size()); 00006 00007 for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){ 00008 newmat.put(it->i, it->j, comple(it->v,0.)); 00009 } 00010 00011 destroy(); 00012 return _(newmat); 00013 } 00014 00015 /////////////////////////////////////////////////////////////////////////////// 00016 /////////////////////////////////////////////////////////////////////////////// 00017 /////////////////////////////////////////////////////////////////////////////// 00018 00019 //============================================================================= 00020 /*! convert to _dgematrix */ 00021 inline _dgematrix _dgsmatrix::to_dgematrix() const 00022 {VERBOSE_REPORT; 00023 dgematrix newmat(m,n); 00024 newmat.zero(); 00025 00026 for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){ 00027 newmat(it->i,it->j) = it->v; 00028 } 00029 00030 destroy(); 00031 return _(newmat); 00032 }