6 std::cerr <<
"# [MARK] operator+(const _dsymatrix&, const _dgbmatrix&)"
11 if(matA.
N!=matB.
N || matA.
N!=matB.
M){
12 std::cerr <<
"[ERROR] operator+(_dsymatrix&, _dgbmatrix&)" << 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=i; j<matA.
N; j++){
23 newmat(i,j) = newmat(j,i) = 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);
40 std::cerr <<
"# [MARK] operator-(const _dsymatrix&, const _dgbmatrix&)"
45 if(matA.
N!=matB.
N || matA.
N!=matB.
M){
46 std::cerr <<
"[ERROR] operator+(_dsymatrix&, _dgbmatrix&)" << std::endl
47 <<
"These two matrises can not make a summation." << std::endl
48 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") + ("
49 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
55 for(
long i=0; i<matB.
M; i++){
56 for(
long j=i; j<matA.
N; j++){
57 newmat(i,j) = newmat(j,i) = matA(i,j);
59 for(
long j=
max(0,i-matB.
KL); j<min(matB.
N,i+matB.
KU+1); j++){
60 newmat(i,j) -= matB(i,j);
74 std::cerr <<
"# [MARK] operator*(const _dsymatrix&, const _dgbmatrix&)"
80 std::cerr <<
"[ERROR] operator*(_dsymatrix&, _dgbmatrix&)" << std::endl
81 <<
"These two matrises can not make a product." << std::endl
82 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") * ("
83 << matB.
M <<
"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,j-matB.
KU); k<min(matB.
M,j+matB.
KL+1); k++){
96 newmat(i,j)+=matA(i,k)*matB(k,j);
void zero()
Definition: dgematrix-misc.hpp:26
double max(double v1, double v2)
Return maximum.
Definition: variousFunctions.cpp:355
long KL
lower band width
Definition: _dgbmatrix.hpp:9
long const & m
matrix row size (readable)
Definition: dgematrix.hpp:14
long const & n
matrix column size (readable)
Definition: dgematrix.hpp:15
void destroy() const
Definition: _dsymatrix-misc.hpp:3
long M
matrix row size
Definition: _dgbmatrix.hpp:7
void destroy() const
Definition: _dgbmatrix-misc.hpp:3
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
long N
matrix column size
Definition: _dgbmatrix.hpp:8
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
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
long N
matrix column or row size
Definition: _dsymatrix.hpp:7
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision Symmetric Matrix Class
Definition: _dsymatrix.hpp:3
long KU
upper band width
Definition: _dgbmatrix.hpp:10
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3