6 if(
n!=mat.
n ||
m!=mat.
m){
8 std::cerr <<
"These two matrises can not make a summation." << std::endl
9 <<
"Your input was (" <<
m <<
"x" <<
n <<
") += (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
14 for(CPPL_INT
i=0;
i<mat.
m;
i++){
15 const CPPL_INT jmax =std::min(
n,
i+mat.
ku+1);
16 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax; j++){
29 if(
n!=mat.
n ||
m!=mat.
m){
31 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
32 <<
"Your input was (" <<
m <<
"x" <<
n <<
") -= (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
37 for(CPPL_INT
i=0;
i<mat.
m;
i++){
38 const CPPL_INT jmax =std::min(
n,
i+mat.
ku+1);
39 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax; j++){
53 std::cerr <<
"These two matrises can not make a product." << std::endl
54 <<
"Your input was (" <<
m <<
"x" <<
n <<
") *= (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
61 for(CPPL_INT
i=0;
i<newmat.
m;
i++){
62 for(CPPL_INT j=0; j<newmat.
n; j++){
63 const CPPL_INT kmax =std::min(mat.
m,j+mat.
kl+1);
64 for(CPPL_INT k=std::max(CPPL_INT(0),j-mat.
ku); k<kmax; k++){
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);
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);
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);
_zgematrix operator+(const zgematrix &matA, const zgbmatrix &matB)
comple & operator()(const CPPL_INT &, const CPPL_INT &)
zgematrix & operator-=(const zgematrix &)
_dgematrix i(const _dgbmatrix &mat)
friend _zgematrix i(const zgematrix &)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT n
matrix column size
zgematrix & operator*=(const zgematrix &)
_zgematrix operator-(const zgematrix &matA, const zgbmatrix &matB)
Complex Double-precision General Dence Matrix Class.
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
_zgematrix operator*(const zgematrix &matA, const zgbmatrix &matB)
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT m
matrix row size
zgematrix & operator+=(const zgematrix &)
CPPL_INT kl
lower band width
friend void swap(zgematrix &, zgematrix &)
_dcovector _(dcovector &vec)