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);
31 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
33 std::cerr <<
"These two matrises can not make a summation." << std::endl
34 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
41 for(CPPL_INT
i=0;
i<matA.
m;
i++){
42 for(CPPL_INT j=max(0,
i-matA.
kl); j<min(matA.
n,
i+matA.
ku+1); j++){
43 newmat(
i,j)-=matA(
i,j);
58 std::cerr <<
"These two matrises can not make a product." << std::endl
59 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
67 for(CPPL_INT c=0; c<matB.vol; c++){
68 for(CPPL_INT
i=max(0,matB.indx[c]-(matA.
ku+1));
69 i<min(matA.
m,matB.indx[c]+matA.
kl);
i++){
70 newmat(
i,matB.jndx[c]) += matA(
i,matB.indx[c])*matB.
array[c];
CPPL_INT ku
upper band width
CPPL_INT kl
lower band width
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT const & m
matrix row size
Complex Double-precision General Dence Matrix Class.
CPPL_INT n
matrix column size
_zgematrix operator+(const _zgbmatrix &matA, const zhematrix &matB)
(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)
_zgematrix operator*(const _zgbmatrix &matA, const zhematrix &matB)
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)