00001 //============================================================================= 00002 /*! convert to _zgematrix */ 00003 inline _zgematrix _zhsmatrix::to_zgematrix() const 00004 {VERBOSE_REPORT; 00005 zgematrix newmat( zgematrix(m,n).zero() ); 00006 00007 for(std::vector<zcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){ 00008 newmat(it->i, it->j) =it->v; 00009 newmat(it->j, it->i) =std::conj(it->v); 00010 } 00011 00012 destroy(); 00013 return _(newmat); 00014 } 00015 00016 //============================================================================= 00017 /*! convert to _zhematrix */ 00018 inline _zhematrix _zhsmatrix::to_zhematrix() const 00019 {VERBOSE_REPORT; 00020 zhematrix newmat(n); 00021 newmat.zero(); 00022 00023 for(std::vector<zcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){ 00024 newmat(it->i, it->j) =it->v; 00025 } 00026 00027 destroy(); 00028 return _(newmat); 00029 } 00030 00031 //============================================================================= 00032 /*! convert to _zgsmatrix */ 00033 inline _zgsmatrix _zhsmatrix::to_zgsmatrix() const 00034 {VERBOSE_REPORT; 00035 zgsmatrix newmat(m,n); 00036 newmat.zero(); 00037 00038 for(std::vector<zcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){ 00039 newmat.put(it->i, it->j, it->v); 00040 if(it->i!=it->j){ 00041 newmat.put(it->j, it->i, std::conj(it->v)); 00042 } 00043 } 00044 00045 destroy(); 00046 return _(newmat); 00047 }