6 std::cerr <<
"# [MARK] operator+(const _zhematrix&, const zgbmatrix&)"
11 if(matA.
N!=matB.N || matA.
N!=matB.M){
12 std::cerr <<
"[ERROR] operator+(_zgematrix&, zgbmatrix&)" << std::endl
13 <<
"These two matrises can not make a summation." << std::endl
14 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") + ("
15 << matB.M <<
"x" << matB.N <<
")." << std::endl;
21 for(
long i=0; i<matB.M; i++){
22 for(
long j=0; j<matA.
N; j++){
23 newmat(i,j) =matA(i,j);
25 for(
long j=max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
26 newmat(i,j)+=matB(i,j);
39 std::cerr <<
"# [MARK] operator-(const _zhematrix&, const zgbmatrix&)"
44 if(matA.
N!=matB.N || matA.
N!=matB.M){
45 std::cerr <<
"[ERROR] operator+(_zhematrix&, zgbmatrix&)" << std::endl
46 <<
"These two matrises can not make a summation." << std::endl
47 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") + ("
48 << matB.M <<
"x" << matB.N <<
")." << std::endl;
54 for(
long i=0; i<matB.M; i++){
55 for(
long j=0; j<matA.
N; j++){
56 newmat(i,j) =matA(i,j);
58 for(
long j=max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
59 newmat(i,j)-=matB(i,j);
72 std::cerr <<
"# [MARK] operator*(const _zhematrix&, const zgbmatrix&)"
78 std::cerr <<
"[ERROR] operator*(_zhematrix&, zgbmatrix&)" << std::endl
79 <<
"These two matrises can not make a product." << std::endl
80 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") * ("
81 << matB.M <<
"x" << matB.N <<
")." << std::endl;
90 #pragma omp parallel for private(j,k)
91 for(i=0; i<newmat.m; i++){
92 for(j=0; j<newmat.n; j++){
93 for(k=max(0,j-matB.KU); k<min(matB.M,j+matB.KL+1); k++){
94 newmat(i,j)+=matA(i,k)*matB(k,j);
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
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
Complex Double-precision General Band Matrix Class.
Definition: zgbmatrix.hpp:3
void destroy() const
Definition: _zhematrix-misc.hpp:3
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
long N
matrix column or row size
Definition: _zhematrix.hpp:7
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3