Go to the source code of this file.
zgsmatrix+zgsmatrix operator
Definition at line 91 of file zgsmatrix-zgsmatrix.hpp.
References _(), zgsmatrix::data, zgsmatrix::m, and zgsmatrix::n.
94 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
96 std::cerr <<
"These two matrises can not make a summation." << std::endl
97 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
104 const std::vector<zcomponent>::const_iterator matB_data_end =matB.
data.end();
105 for(std::vector<zcomponent>::const_iterator it=matB.
data.begin(); it!=matB_data_end; it++){
106 newmat(it->i, it->j) +=it->v;
Complex Double-precision General Sparse Matrix Class.
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
zgsmatrix-zgsmatrix operator
Definition at line 114 of file zgsmatrix-zgsmatrix.hpp.
References _(), zgsmatrix::data, zgsmatrix::m, and zgsmatrix::n.
115 {CPPL_VERBOSE_REPORT;
117 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
119 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
120 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
127 const std::vector<zcomponent>::const_iterator matB_data_end =matB.
data.end();
128 for(std::vector<zcomponent>::const_iterator it=matB.
data.begin(); it!=matB_data_end; it++){
129 newmat(it->i, it->j) -=it->v;
Complex Double-precision General Sparse Matrix Class.
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
zgsmatrix*zgsmatrix operator
Definition at line 137 of file zgsmatrix-zgsmatrix.hpp.
References _(), zgsmatrix::data, zgsmatrix::m, zgsmatrix::n, and zgsmatrix::rows.
138 {CPPL_VERBOSE_REPORT;
142 std::cerr <<
"These two matrises can not make a product." << std::endl
143 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
150 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
151 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
153 const std::vector<CPPL_INT>::const_iterator matB_rows_k_end =matB.
rows[k].end();
154 for(std::vector<CPPL_INT>::const_iterator p=matB.
rows[k].begin(); p!=matB_rows_k_end; p++){
155 newmat(it->i,matB.
data[*p].j) +=it->v*matB.
data[*p].v;
Complex Double-precision General Sparse Matrix Class.
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)