6 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
8 std::cerr <<
"These two matrises can not make a summation." << std::endl
9 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
16 for(CPPL_INT
i=0;
i<matA.
m;
i++){
17 for(CPPL_INT j=max(0,
i-matA.
kl); j<min(matA.
n,
i+matA.
ku+1); j++){
18 newmat(
i,j)+=matA(
i,j);
30 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
32 std::cerr <<
"These two matrises can not make a summation." << std::endl
33 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
40 for(CPPL_INT
i=0;
i<matA.
m;
i++){
41 for(CPPL_INT j=max(0,
i-matA.
kl); j<min(matA.
n,
i+matA.
ku+1); j++){
42 newmat(
i,j)-=matA(
i,j);
56 std::cerr <<
"These two matrises can not make a product." << std::endl
57 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
65 for(CPPL_INT c=0; c<matB.vol; c++){
66 for(CPPL_INT
i=max(0,matB.indx[c]-(matA.
ku+1));
67 i<min(matA.
m,matB.indx[c]+matA.
kl);
i++){
68 newmat(
i,matB.jndx[c]) += matA(
i,matB.indx[c])*matB.
array[c];
_zgematrix operator*(const zgbmatrix &matA, const zhematrix &matB)
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT const & m
matrix row size
Complex Double-precision General Dence Matrix Class.
_zgematrix operator-(const zgbmatrix &matA, const zhematrix &matB)
CPPL_INT n
matrix column size
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
comple * array
1D array to store matrix data
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
_dcovector _(dcovector &vec)
_zgematrix operator+(const zgbmatrix &matA, const zhematrix &matB)