Go to the source code of this file.
zgematrix+zgbmatrix operator
Definition at line 80 of file zgematrix-zgbmatrix.hpp.
References _(), i(), zgbmatrix::kl, zgbmatrix::ku, zgbmatrix::m, zgematrix::m, zgematrix::n, and zgbmatrix::n.
83 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
85 std::cerr <<
"These two matrises can not make a summation." << std::endl
86 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
93 for(CPPL_INT
i=0;
i<matB.
m;
i++){
94 const CPPL_INT jmax =std::min(matB.
n,
i+matB.
ku+1);
95 for(CPPL_INT j=std::max(CPPL_INT(0),
i-matB.
kl); j<jmax; j++){
96 newmat(
i,j) += matB(
i,j);
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT kl
lower band width
_dcovector _(dcovector &vec)
zgematrix-zgbmatrix operator
Definition at line 105 of file zgematrix-zgbmatrix.hpp.
References _(), i(), zgbmatrix::kl, zgbmatrix::ku, zgbmatrix::m, zgematrix::m, zgematrix::n, and zgbmatrix::n.
106 {CPPL_VERBOSE_REPORT;
108 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
110 std::cerr <<
"These two matrises can not make a summation." << std::endl
111 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
118 for(CPPL_INT
i=0;
i<matB.
m;
i++){
119 const CPPL_INT jmax =std::min(matB.
n,
i+matB.
ku+1);
120 for(CPPL_INT j=std::max(CPPL_INT(0),
i-matB.
kl); j<jmax; j++){
121 newmat(
i,j) -= matB(
i,j);
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT kl
lower band width
_dcovector _(dcovector &vec)
zgematrix*zgbmatrix operator
Definition at line 130 of file zgematrix-zgbmatrix.hpp.
References _(), i(), zgbmatrix::kl, zgbmatrix::ku, zgbmatrix::m, zgematrix::m, zgematrix::n, zgbmatrix::n, and zgematrix::zero().
131 {CPPL_VERBOSE_REPORT;
135 std::cerr <<
"These two matrises can not make a product." << std::endl
136 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
144 for(CPPL_INT
i=0;
i<newmat.
m;
i++){
145 for(CPPL_INT j=0; j<newmat.n; j++){
146 const CPPL_INT kmax =std::min(matB.
m,j+matB.
kl+1);
147 for(CPPL_INT k=std::max(CPPL_INT(0),j-matB.
ku); k<kmax; k++){
148 newmat(
i,j) += matA(
i,k)*matB(k,j);
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT kl
lower band width
_dcovector _(dcovector &vec)