Go to the source code of this file.
zgsmatrix+_zgsmatrix operator
Definition at line 92 of file zgsmatrix-_zgsmatrix.hpp.
References _(), zgsmatrix::data, _zgsmatrix::m, zgsmatrix::m, zgsmatrix::n, and _zgsmatrix::n.
95 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
97 std::cerr <<
"These two matrises can not make a summation." << std::endl
98 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
105 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
106 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
107 newmat(it->i,it->j) += it->v;
Complex Double-precision General Sparse Matrix Class.
CPPL_INT n
matrix column size
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
zgsmatrix-_zgsmatrix operator
Definition at line 115 of file zgsmatrix-_zgsmatrix.hpp.
References _(), zgsmatrix::chsign(), zgsmatrix::data, _zgsmatrix::m, zgsmatrix::m, zgsmatrix::n, and _zgsmatrix::n.
116 {CPPL_VERBOSE_REPORT;
118 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
120 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
121 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
129 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
130 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
131 newmat(it->i,it->j) += it->v;
Complex Double-precision General Sparse Matrix Class.
CPPL_INT n
matrix column size
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
zgsmatrix*_zgsmatrix operator
Definition at line 139 of file zgsmatrix-_zgsmatrix.hpp.
References _(), zgsmatrix::data, _zgsmatrix::data, _zgsmatrix::destroy(), _zgsmatrix::m, zgsmatrix::m, _zgsmatrix::n, zgsmatrix::n, and _zgsmatrix::rows.
140 {CPPL_VERBOSE_REPORT;
144 std::cerr <<
"These two matrises can not make a product." << std::endl
145 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
152 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
153 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
155 const std::vector<CPPL_INT>::iterator matB_rows_k_end =matB.
rows[k].end();
156 for(std::vector<CPPL_INT>::iterator p=matB.
rows[k].begin(); p!=matB_rows_k_end; p++){
157 newmat(it->i,matB.
data[*p].j) += it->v*matB.
data[*p].v;
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
Complex Double-precision General Sparse Matrix Class.
CPPL_INT n
matrix column size
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data