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++){
30 std::cerr <<
"# [MARK] zgematrix::operator+=(const zgbmatrix&)"
35 if(N!=mat.N || M!=mat.M){
36 std::cerr <<
"[ERROR] zgematrix::operator+=(const zgbmatrix&)" << std::endl
37 <<
"These two matrises can not make a summation." << std::endl
38 <<
"Your input was (" << M <<
"x" << N <<
") += ("
39 << mat.M <<
"x" << mat.N <<
")." << std::endl;
44 for(
long i=0;
i<mat.M;
i++){
45 for(
long j=max(0,
i-mat.KL); j<min(N,
i+mat.KU+1); j++){
58 std::cerr <<
"# [MARK] zgematrix::operator-=(const zgbmatrix&)"
63 if(N!=mat.N || M!=mat.M){
64 std::cerr <<
"[ERROR] zgematrix::operator-=(const zgbmatrix&)" << std::endl
65 <<
"These two matrises can not make a subtraction." << std::endl
66 <<
"Your input was (" << M <<
"x" << N <<
") -= ("
67 << mat.M <<
"x" << mat.N <<
")." << std::endl;
72 for(
long i=0;
i<mat.M;
i++){
73 for(
long j=max(0,
i-mat.KL); j<min(N,
i+mat.KU+1); j++){
85 std::cerr <<
"# [MARK] zgematrix::operator*=(const zgbmatrix&)"
91 std::cerr <<
"[ERROR] zgematrix::operator*=(const zgbmatrix&)" << std::endl
92 <<
"These two matrises can not make a product." << std::endl
93 <<
"Your input was (" << M <<
"x" << N <<
") *= ("
94 << mat.M <<
"x" << mat.N <<
")." << std::endl;
101 for(
long i=0;
i<newmat.
m;
i++){
for(
long j=0; j<newmat.
n; j++){
102 for(
long k=max(0,j-mat.KU); k<min(mat.M,j+mat.KL+1); k++){
120 std::cerr <<
"# [MARK] operator+(const zgematrix&, const zgbmatrix&)"
125 if(matA.N!=matB.N || matA.M!=matB.M){
126 std::cerr <<
"[ERROR] operator+(zgematrix&, zgbmatrix&)" << std::endl
127 <<
"These two matrises can not make a summation." << std::endl
128 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
129 << matB.M <<
"x" << matB.N <<
")." << std::endl;
136 for(
long i=0; i<matB.M; i++){
137 for(
long j=max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
138 newmat(i,j)+=matB(i,j);
150 std::cerr <<
"# [MARK] operator-(const zgematrix&, const zgbmatrix&)"
155 if(matA.N!=matB.N || matA.M!=matB.M){
156 std::cerr <<
"[ERROR] operator+(zgematrix&, zgbmatrix&)" << std::endl
157 <<
"These two matrises can not make a summation." << std::endl
158 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
159 << matB.M <<
"x" << matB.N <<
")." << std::endl;
166 for(
long i=0; i<matB.M; i++){
167 for(
long j=max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
168 newmat(i,j)-=matB(i,j);
180 std::cerr <<
"# [MARK] operator*(const zgematrix&, const zgbmatrix&)"
186 std::cerr <<
"[ERROR] operator*(zgematrix&, zgbmatrix&)" << std::endl
187 <<
"These two matrises can not make a product." << std::endl
188 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
189 << matB.M <<
"x" << matB.N <<
")." << std::endl;
198 #pragma omp parallel for private(j,k)
199 for(i=0; i<newmat.
m; i++){
200 for(j=0; j<newmat.
n; j++){
201 for(k=max(0,j-matB.KU); k<min(matB.M,j+matB.KL+1); k++){
202 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
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
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
void zero()
Definition: zgematrix-misc.hpp:26
Complex Double-precision General Band Matrix Class.
Definition: zgbmatrix.hpp:3
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 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