6 std::cerr <<
"# [MARK] operator+(const zgbmatrix&, const _zhematrix&)"
11 if(matA.N!=matB.
N || matA.M!=matB.
N){
12 std::cerr <<
"[ERROR] operator+(zgbmatrix&, _zgematrix&)" << std::endl
13 <<
"These two matrises can not make a summation." << std::endl
14 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
15 << matB.
N <<
"x" << matB.
N <<
")." << std::endl;
22 for(
long i=0; i<matA.M; i++){
23 for(
long j=0; j<matB.
N; j++){
24 newmat(i,j) =matB(i,j);
26 for(
long j=max(0,i-matA.KL); j<min(matA.N,i+matA.KU+1); j++){
27 newmat(i,j)+=matA(i,j);
40 std::cerr <<
"# [MARK] operator-(const zgbmatrix&, const _zhematrix&)"
45 if(matA.N!=matB.
N || matA.M!=matB.
N){
46 std::cerr <<
"[ERROR] operator+(zgbmatrix&, _zhematrix&)" << std::endl
47 <<
"These two matrises can not make a summation." << std::endl
48 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
49 << matB.
N <<
"x" << matB.
N <<
")." << std::endl;
56 for(
long i=0; i<matA.M; i++){
57 for(
long j=0; j<matB.
N; j++){
58 newmat(i,j) =-matB(i,j);
60 for(
long j=max(0,i-matA.KL); j<min(matA.N,i+matA.KU+1); j++){
61 newmat(i,j) +=matA(i,j);
74 std::cerr <<
"# [MARK] operator*(const zgbmatrix&, const _zhematrix&)"
80 std::cerr <<
"[ERROR] operator*(zgbmatrix&, _zhematrix&)" << std::endl
81 <<
"These two matrises can not make a product." << std::endl
82 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
83 << matB.
N <<
"x" << matB.
N <<
")." << std::endl;
92 #pragma omp parallel for private(j,k)
93 for(i=0; i<newmat.m; i++){
94 for(j=0; j<newmat.n; j++){
95 for(k=max(0,i-matA.KL); k<min(matA.N,i+matA.KU+1); k++){
96 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