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);
32 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
34 std::cerr <<
"These two matrises can not make a summation." << std::endl
35 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
42 for(CPPL_INT
i=0;
i<matA.
m;
i++){
43 for(CPPL_INT j=max(0,
i-matA.
kl); j<min(matA.
n,
i+matA.
ku+1); j++){
44 newmat(
i,j)-=matA(
i,j);
60 std::cerr <<
"These two matrises can not make a product." << std::endl
61 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
69 for(CPPL_INT c=0; c<matB.vol; c++){
70 for(CPPL_INT
i=max(0,matB.indx[c]-(matA.
ku+1));
71 i<min(matA.
m,matB.indx[c]+matA.
kl);
i++){
72 newmat(
i,matB.jndx[c]) += matA(
i,matB.indx[c])*matB.
array[c];
CPPL_INT ku
upper band width
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
_zgematrix operator-(const _zgbmatrix &matA, const _zhematrix &matB)
_zgematrix operator+(const _zgbmatrix &matA, const _zhematrix &matB)
CPPL_INT kl
lower band width
CPPL_INT n
matrix column size
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision General Dence Matrix Class.
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
comple * array
1D array to store matrix data
_zgematrix operator*(const _zgbmatrix &matA, const _zhematrix &matB)
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
CPPL_INT m
matrix row size
CPPL_INT const & m
matrix row and size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)