Go to the documentation of this file.00001
00002
00003 inline _zhsmatrix dssmatrix::to_zhsmatrix() const
00004 {VERBOSE_REPORT;
00005 zhsmatrix newmat(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.0));
00008 }
00009
00010 return _(newmat);
00011 }
00012
00013
00014
00015
00016
00017
00018
00019 inline _dgematrix dssmatrix::to_dgematrix() const
00020 {VERBOSE_REPORT;
00021 dgematrix newmat(m,n);
00022 newmat.zero();
00023 for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){
00024 newmat(it->i, it->j) =it->v;
00025 newmat(it->j, it->i) =it->v;
00026 }
00027
00028 return _(newmat);
00029 }
00030
00031
00032
00033 inline _dsymatrix dssmatrix::to_dsymatrix() const
00034 {VERBOSE_REPORT;
00035 dsymatrix newmat(n);
00036 newmat.zero();
00037 for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){
00038 newmat(it->i, it->j) =it->v;
00039 }
00040
00041 return _(newmat);
00042 }
00043
00044
00045
00046 inline _dgsmatrix dssmatrix::to_dgsmatrix() const
00047 {VERBOSE_REPORT;
00048 dgsmatrix newmat( dgsmatrix(m,n,data.size()*2) );
00049 newmat.zero();
00050 for(std::vector<dcomponent>::const_iterator it=data.begin(); it!=data.end(); it++){
00051 newmat.put(it->i, it->j, it->v);
00052 if(it->i!=it->j){
00053 newmat.put(it->j, it->i, it->v);
00054 }
00055 }
00056
00057 return _(newmat);
00058 }