Go to the source code of this file.
zgsmatrix+_zgbmatrix operator
Definition at line 3 of file zgsmatrix-_zgbmatrix.hpp.
References _(), _zgbmatrix::destroy(), i(), _zgbmatrix::kl, _zgbmatrix::ku, _zgbmatrix::m, zgsmatrix::m, _zgbmatrix::n, zgsmatrix::n, and zgsmatrix::to_zgematrix().
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<matB.
m;
i++){
17 const CPPL_INT jmax =std::min(matB.
n,
i+matB.
ku+1);
18 for(CPPL_INT j=std::max(CPPL_INT(0),
i-matB.
kl); j<jmax; j++){
19 newmat(
i,j) +=matB(
i,j);
CPPL_INT ku
upper band width
CPPL_INT kl
lower band width
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision General Dence Matrix Class.
_zgematrix to_zgematrix() const
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
zgsmatrix-_zgbmatrix operator
Definition at line 29 of file zgsmatrix-_zgbmatrix.hpp.
References _(), _zgbmatrix::destroy(), i(), _zgbmatrix::kl, _zgbmatrix::ku, _zgbmatrix::m, zgsmatrix::m, _zgbmatrix::n, zgsmatrix::n, and zgsmatrix::to_zgematrix().
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<matB.
m;
i++){
43 const CPPL_INT jmax =std::min(matB.
n,
i+matB.
ku+1);
44 for(CPPL_INT j=std::max(CPPL_INT(0),
i-matB.
kl); j<jmax; j++){
45 newmat(
i,j) -=matB(
i,j);
CPPL_INT ku
upper band width
CPPL_INT kl
lower band width
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision General Dence Matrix Class.
_zgematrix to_zgematrix() const
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
zgsmatrix*_zgbmatrix operator
Definition at line 55 of file zgsmatrix-_zgbmatrix.hpp.
References _(), zgsmatrix::data, _zgbmatrix::destroy(), _zgbmatrix::kl, _zgbmatrix::ku, zgsmatrix::m, _zgbmatrix::m, zgsmatrix::n, _zgbmatrix::n, and zgematrix::zero().
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 const std::vector<zcomponent>::const_iterator matA_data_end =matA.
data.end();
70 for(std::vector<zcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
71 const CPPL_INT jmax =std::min(matB.
n,it->j+matB.
ku+1);
72 for(CPPL_INT j=std::max(CPPL_INT(0),it->j-matB.
kl); j<jmax; j++){
73 newmat(it->i,j) += it->v*matB(it->j,j);
CPPL_INT ku
upper band width
CPPL_INT kl
lower band width
Complex Double-precision General Dence Matrix Class.
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)