6 std::cerr <<
"# [MARK] dgematrix::operator=(const _dgbmatrix&)"
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++){
31 std::cerr <<
"# [MARK] dgematrix::operator+=(const _dgbmatrix&)"
36 if(N!=mat.
N || M!=mat.
M){
37 std::cerr <<
"[ERROR] dgematrix::operator+=(const _dgbmatrix&)" << std::endl
38 <<
"These two matrises can not make a summation." << std::endl
39 <<
"Your input was (" << M <<
"x" << N <<
") += ("
40 << mat.
M <<
"x" << mat.
N <<
")." << std::endl;
45 for(
long i=0;
i<mat.
M;
i++){
46 for(
long j=max(0,
i-mat.
KL); j<min(N,
i+mat.
KU+1); j++){
60 std::cerr <<
"# [MARK] dgematrix::operator-=(const _dgbmatrix&)"
65 if(N!=mat.
N || M!=mat.
M){
66 std::cerr <<
"[ERROR] dgematrix::operator-=(const _dgbmatrix&)" << std::endl
67 <<
"These two matrises can not make a subtraction." << std::endl
68 <<
"Your input was (" << M <<
"x" << N <<
") -= ("
69 << mat.
M <<
"x" << mat.
N <<
")." << std::endl;
74 for(
long i=0;
i<mat.
M;
i++){
75 for(
long j=max(0,
i-mat.
KL); j<min(N,
i+mat.
KU+1); j++){
88 std::cerr <<
"# [MARK] dgematrix::operator*=(const _dgbmatrix&)"
94 std::cerr <<
"[ERROR] dgematrix::operator*=(const _dgbmatrix&)" << std::endl
95 <<
"These two matrises can not make a product." << std::endl
96 <<
"Your input was (" << M <<
"x" << N <<
") *= ("
97 << mat.
M <<
"x" << mat.
N <<
")." << std::endl;
105 for(
long i=0;
i<newmat.M;
i++){
for(
long j=0; j<newmat.N; j++){
106 for(
long k=max(0,j-mat.
KU); k<min(mat.
M,j+mat.
KL+1); k++){
125 std::cerr <<
"# [MARK] operator+(const dgematrix&, const _dgbmatrix&)"
130 if(matA.N!=matB.
N || matA.M!=matB.
M){
131 std::cerr <<
"[ERROR] operator+(dgematrix&, dgbmatrix&)" << std::endl
132 <<
"These two matrises can not make a summation." << std::endl
133 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
134 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
141 for(
long i=0; i<matB.
M; i++){
142 for(
long j=max(0,i-matB.
KL); j<min(matB.
N,i+matB.
KU+1); j++){
143 newmat(i,j)+=matB(i,j);
156 std::cerr <<
"# [MARK] operator-(const dgematrix&, const _dgbmatrix&)"
161 if(matA.N!=matB.
N || matA.M!=matB.
M){
162 std::cerr <<
"[ERROR] operator+(dgematrix&, _dgbmatrix&)" << std::endl
163 <<
"These two matrises can not make a summation." << std::endl
164 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
165 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
172 for(
long i=0; i<matB.
M; i++){
173 for(
long j=max(0,i-matB.
KL); j<min(matB.
N,i+matB.
KU+1); j++){
174 newmat(i,j)-=matB(i,j);
187 std::cerr <<
"# [MARK] operator*(const dgematrix&, const _dgbmatrix&)"
193 std::cerr <<
"[ERROR] operator*(dgematrix&, _dgbmatrix&)" << std::endl
194 <<
"These two matrises can not make a product." << std::endl
195 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
196 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
205 #pragma omp parallel for private(j,k)
206 for(i=0; i<newmat.M; i++){
207 for(j=0; j<newmat.N; j++){
208 for(k=max(0,j-matB.
KU); k<min(matB.
M,j+matB.
KL+1); k++){
209 newmat(i,j)+=matA(i,k)*matB(k,j);
void zero()
Definition: dgematrix-misc.hpp:26
long KL
lower band width
Definition: _dgbmatrix.hpp:9
void resize(const long &, const long &)
Definition: dgematrix-misc.hpp:126
long M
matrix row size
Definition: _dgbmatrix.hpp:7
void destroy() const
Definition: _dgbmatrix-misc.hpp:3
friend void swap(dgematrix &, dgematrix &)
Definition: dgematrix-misc.hpp:154
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
long N
matrix column size
Definition: _dgbmatrix.hpp:8
dgematrix & operator=(const dgematrix &)
Definition: dgematrix-dgematrix.hpp:3
dgematrix & operator*=(const dgematrix &)
Definition: dgematrix-dgematrix.hpp:68
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
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
dgematrix & operator-=(const dgematrix &)
Definition: dgematrix-dgematrix.hpp:45
friend _dgematrix i(const dgematrix &)
Definition: dgematrix-calc.hpp:21
dgematrix & operator+=(const dgematrix &)
Definition: dgematrix-dgematrix.hpp:22
long KU
upper band width
Definition: _dgbmatrix.hpp:10
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3
double & operator()(const long &, const long &)
Definition: dgematrix-io.hpp:3