Go to the source code of this file.
_zgsmatrix+zhematrix operator
Definition at line 3 of file _zgsmatrix-zhematrix.hpp.
References _(), _zgsmatrix::data, _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
Complex Double-precision General Dence Matrix Class.
_zgematrix to_zgematrix() const
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data
_zgsmatrix-zhematrix operator
Definition at line 27 of file _zgsmatrix-zhematrix.hpp.
References _(), _zgsmatrix::data, _zgsmatrix::destroy(), _zgsmatrix::m, _zgsmatrix::n, and zhematrix::n.
30 if(matA.
m!=matB.
n || matA.
n!=matB.
n){
32 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
33 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
39 zgematrix newmat( (-matB).to_zgematrix() );
42 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
43 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
44 newmat(it->i,it->j) += it->v;
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data
_zgsmatrix*zhematrix operator
Definition at line 54 of file _zgsmatrix-zhematrix.hpp.
References _(), _zgsmatrix::data, _zgsmatrix::destroy(), i(), _zgsmatrix::m, _zgsmatrix::n, zhematrix::n, and zgematrix::zero().
59 std::cerr <<
"These two matrises can not make a product." << std::endl
60 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
68 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
69 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
70 for(CPPL_INT
i=0;
i<matB.
n;
i++){
71 newmat(it->i,
i) += it->v*matB(it->j,
i);
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data