Go to the source code of this file.
_zgsmatrix+_zhematrix operator
Definition at line 3 of file _zgsmatrix-_zhematrix.hpp.
References _(), _zgsmatrix::data, _zhematrix::destroy(), _zgsmatrix::destroy(), _zgsmatrix::m, _zgsmatrix::n, _zhematrix::n, and _zhematrix::to_zgematrix().
6 if(matA.
m!=matB.
n || matA.
n!=matB.
n){
8 std::cerr <<
"These two matrises can not make a summation." << std::endl
9 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
16 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
17 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
18 newmat(it->i,it->j) += it->v;
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
_zgematrix to_zgematrix() const
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data
_zgsmatrix-_zhematrix operator
Definition at line 28 of file _zgsmatrix-_zhematrix.hpp.
References _(), _zgsmatrix::data, _zgsmatrix::destroy(), _zhematrix::destroy(), _zgsmatrix::m, _zgsmatrix::n, and _zhematrix::n.
31 if(matA.
m!=matB.
n || matA.
n!=matB.
n){
33 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
34 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
40 zgematrix newmat( (-matB).to_zgematrix() );
43 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
44 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
45 newmat(it->i,it->j) += it->v;
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data
_zgsmatrix*_zhematrix operator
Definition at line 56 of file _zgsmatrix-_zhematrix.hpp.
References _(), _zgsmatrix::data, _zhematrix::destroy(), _zgsmatrix::destroy(), i(), _zgsmatrix::m, _zgsmatrix::n, _zhematrix::n, and zgematrix::zero().
61 std::cerr <<
"These two matrises can not make a product." << std::endl
62 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
70 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
71 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
72 for(CPPL_INT
i=0;
i<matB.
n;
i++){
73 newmat(it->i,
i) += it->v*matB(it->j,
i);
CPPL_INT n
matrix column size
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data