6 std::cerr <<
"# [MARK] operator+(const dgbmatrix&, const _dgematrix&)"
11 if(matA.N!=matB.
N || matA.M!=matB.
M){
12 std::cerr <<
"[ERROR] operator+(dgbmatrix&, _dgematrix&)" << std::endl
13 <<
"These two matrises can not make a summation." << std::endl
14 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
15 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
20 for(
long i=0; i<matA.M; i++){
21 for(
long j=max(0,i-matA.KL); j<min(matA.N,i+matA.KU+1); j++){
34 std::cerr <<
"# [MARK] operator-(const dgbmatrix&, const _dgematrix&)"
39 if(matA.N!=matB.
N || matA.M!=matB.
M){
40 std::cerr <<
"[ERROR] operator+(dgbmatrix&, _dgematrix&)" << std::endl
41 <<
"These two matrises can not make a summation." << std::endl
42 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
43 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
49 for(
long i=0; i<matB.
M*matB.
N; i++){
54 for(
long i=0; i<matA.M; i++){
55 for(
long j=max(0,i-matA.KL); j<min(matA.N,i+matA.KU+1); j++){
56 matB(i,j) +=matA(i,j);
68 std::cerr <<
"# [MARK] operator*(const dgbmatrix&, const _dgematrix&)"
74 std::cerr <<
"[ERROR] operator*(dgbmatrix&, _dgematrix&)" << std::endl
75 <<
"These two matrises can not make a product." << std::endl
76 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
77 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
86 #pragma omp parallel for private(j,k)
87 for(i=0; i<newmat.m; i++){
88 for(j=0; j<newmat.n; j++){
89 for(k=max(0,i-matA.KL); k<min(matA.N,i+matA.KU+1); k++){
90 newmat(i,j)+=matA(i,k)*matB(k,j);
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
friend _drovector operator-(const _drovector &)
Definition: _drovector-unary.hpp:15
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
Definition: _dgematrix.hpp:3
long N
matrix column size
Definition: _dgematrix.hpp:8
Real Double-precision General Band Matrix Class.
Definition: dgbmatrix.hpp:3
double * Array
1D array to store matrix data
Definition: _dgematrix.hpp:9
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
void destroy() const
Definition: _dgematrix-misc.hpp:3
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3
long M
matrix row size
Definition: _dgematrix.hpp:7