Go to the source code of this file.
dgsmatrix+_dgsmatrix operator
Definition at line 92 of file dgsmatrix-_dgsmatrix.hpp.
References _(), dgsmatrix::data, _dgsmatrix::m, dgsmatrix::m, dgsmatrix::n, and _dgsmatrix::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<dcomponent>::const_iterator matA_data_end =matA.
data.end();
106 for(std::vector<dcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
107 newmat(it->i,it->j) += it->v;
Real Double-precision General Sparse Matrix Class.
std::vector< dcomponent > data
matrix data
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
CPPL_INT m
matrix row size
dgsmatrix-_dgsmatrix operator
Definition at line 115 of file dgsmatrix-_dgsmatrix.hpp.
References _(), dgsmatrix::chsign(), dgsmatrix::data, _dgsmatrix::m, dgsmatrix::m, dgsmatrix::n, and _dgsmatrix::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<dcomponent>::const_iterator matA_data_end =matA.
data.end();
130 for(std::vector<dcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
131 newmat(it->i,it->j) += it->v;
Real Double-precision General Sparse Matrix Class.
std::vector< dcomponent > data
matrix data
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
CPPL_INT m
matrix row size
dgsmatrix*_dgsmatrix operator
Definition at line 139 of file dgsmatrix-_dgsmatrix.hpp.
References _(), dgsmatrix::data, _dgsmatrix::data, _dgsmatrix::destroy(), _dgsmatrix::m, dgsmatrix::m, _dgsmatrix::n, dgsmatrix::n, and _dgsmatrix::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<dcomponent>::const_iterator matA_data_end =matA.
data.end();
153 for(std::vector<dcomponent>::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;
Real Double-precision General Sparse Matrix Class.
std::vector< dcomponent > data
matrix data
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
std::vector< dcomponent > data
matrix data
_dcovector _(dcovector &vec)
CPPL_INT m
matrix row size