6 std::cerr <<
"# [MARK] zgematrix::operator=(const _zgbmatrix&)"
12 for(
long i=0;
i<mat.
M;
i++){
13 for(
long j=max(0,
i-mat.
KL); j<min(N,
i+mat.
KU+1); j++){
31 std::cerr <<
"# [MARK] zgematrix::operator+=(const _zgbmatrix&)"
36 if(N!=mat.
N || M!=mat.
M){
37 std::cerr <<
"[ERROR] zgematrix::operator+=(const _zgbmatrix&)" << std::endl
38 <<
"These two matrises can not make a summation." << std::endl
39 <<
"Your input was (" << M <<
"x" << N <<
") += ("
40 << mat.
M <<
"x" << mat.
N <<
")." << std::endl;
45 for(
long i=0;
i<mat.
M;
i++){
46 for(
long j=max(0,
i-mat.
KL); j<min(N,
i+mat.
KU+1); j++){
60 std::cerr <<
"# [MARK] zgematrix::operator-=(const _zgbmatrix&)"
65 if(N!=mat.
N || M!=mat.
M){
66 std::cerr <<
"[ERROR] zgematrix::operator-=(const _zgbmatrix&)" << std::endl
67 <<
"These two matrises can not make a subtraction." << std::endl
68 <<
"Your input was (" << M <<
"x" << N <<
") -= ("
69 << mat.
M <<
"x" << mat.
N <<
")." << std::endl;
74 for(
long i=0;
i<mat.
M;
i++){
75 for(
long j=max(0,
i-mat.
KL); j<min(N,
i+mat.
KU+1); j++){
88 std::cerr <<
"# [MARK] zgematrix::operator*=(const _zgbmatrix&)"
94 std::cerr <<
"[ERROR] zgematrix::operator*=(const _zgbmatrix&)" << std::endl
95 <<
"These two matrises can not make a product." << std::endl
96 <<
"Your input was (" << M <<
"x" << N <<
") *= ("
97 << mat.
M <<
"x" << mat.
N <<
")." << std::endl;
105 for(
long i=0;
i<newmat.
m;
i++){
for(
long j=0; j<newmat.
n; j++){
106 for(
long k=max(0,j-mat.
KU); k<min(mat.
M,j+mat.
KL+1); k++){
125 std::cerr <<
"# [MARK] operator+(const zgematrix&, const _zgbmatrix&)"
130 if(matA.N!=matB.
N || matA.M!=matB.
M){
131 std::cerr <<
"[ERROR] operator+(zgematrix&, zgbmatrix&)" << std::endl
132 <<
"These two matrises can not make a summation." << std::endl
133 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
134 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
141 for(
long i=0; i<matB.
M; i++){
142 for(
long j=max(0,i-matB.
KL); j<min(matB.
N,i+matB.
KU+1); j++){
143 newmat(i,j)+=matB(i,j);
156 std::cerr <<
"# [MARK] operator-(const zgematrix&, const _zgbmatrix&)"
161 if(matA.N!=matB.
N || matA.M!=matB.
M){
162 std::cerr <<
"[ERROR] operator+(zgematrix&, _zgbmatrix&)" << std::endl
163 <<
"These two matrises can not make a summation." << std::endl
164 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
165 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
172 for(
long i=0; i<matB.
M; i++){
173 for(
long j=max(0,i-matB.
KL); j<min(matB.
N,i+matB.
KU+1); j++){
174 newmat(i,j)-=matB(i,j);
187 std::cerr <<
"# [MARK] operator*(const zgematrix&, const _zgbmatrix&)"
193 std::cerr <<
"[ERROR] operator*(zgematrix&, _zgbmatrix&)" << std::endl
194 <<
"These two matrises can not make a product." << std::endl
195 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
196 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
205 #pragma omp parallel for private(j,k)
206 for(i=0; i<newmat.
m; i++){
207 for(j=0; j<newmat.
n; j++){
208 for(k=max(0,j-matB.
KU); k<min(matB.
M,j+matB.
KL+1); k++){
209 newmat(i,j)+=matA(i,k)*matB(k,j);
void resize(const long &, const long &)
Definition: zgematrix-misc.hpp:126
zgematrix & operator-=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:45
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
zgematrix & operator=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:3
long N
matrix column size
Definition: _zgbmatrix.hpp:8
void destroy() const
Definition: _zgbmatrix-misc.hpp:3
friend _zgematrix i(const zgematrix &)
Definition: zgematrix-calc.hpp:21
zgematrix & operator*=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:68
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
long KU
upper band width
Definition: _zgbmatrix.hpp:10
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
void zero()
Definition: zgematrix-misc.hpp:26
std::complex< double > & operator()(const long &, const long &)
Definition: zgematrix-io.hpp:3
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
long M
matrix row size
Definition: _zgbmatrix.hpp:7
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
long const & m
matrix row size (readable)
Definition: zgematrix.hpp:14
zgematrix & operator+=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:22
friend void swap(zgematrix &, zgematrix &)
Definition: zgematrix-misc.hpp:154
long const & n
matrix column size (readable)
Definition: zgematrix.hpp:15
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3
long KL
lower band width
Definition: _zgbmatrix.hpp:9