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++){
30 std::cerr <<
"# [MARK] dgematrix::operator+=(const dgbmatrix&)"
35 if(N!=mat.N || M!=mat.M){
36 std::cerr <<
"[ERROR] dgematrix::operator+=(const dgbmatrix&)" << std::endl
37 <<
"These two matrises can not make a summation." << std::endl
38 <<
"Your input was (" << M <<
"x" << N <<
") += ("
39 << mat.M <<
"x" << mat.N <<
")." << std::endl;
44 for(
long i=0;
i<mat.M;
i++){
45 for(
long j=
max(0,
i-mat.KL); j<min(N,
i+mat.KU+1); j++){
58 std::cerr <<
"# [MARK] dgematrix::operator-=(const dgbmatrix&)"
63 if(N!=mat.N || M!=mat.M){
64 std::cerr <<
"[ERROR] dgematrix::operator-=(const dgbmatrix&)" << std::endl
65 <<
"These two matrises can not make a subtraction." << std::endl
66 <<
"Your input was (" << M <<
"x" << N <<
") -= ("
67 << mat.M <<
"x" << mat.N <<
")." << std::endl;
72 for(
long i=0;
i<mat.M;
i++){
73 for(
long j=
max(0,
i-mat.KL); j<min(N,
i+mat.KU+1); j++){
86 std::cerr <<
"# [MARK] dgematrix::operator*=(const dgbmatrix&)"
92 std::cerr <<
"[ERROR] dgematrix::operator*=(const dgbmatrix&)" << std::endl
93 <<
"These two matrises can not make a product." << std::endl
94 <<
"Your input was (" << M <<
"x" << N <<
") *= ("
95 << mat.M <<
"x" << mat.N <<
")." << std::endl;
102 for(
long i=0;
i<newmat.M;
i++){
for(
long j=0; j<newmat.N; j++){
103 for(
long k=
max(0,j-mat.KU); k<min(mat.M,j+mat.KL+1); k++){
121 std::cerr <<
"# [MARK] operator+(const dgematrix&, const dgbmatrix&)"
126 if(matA.N!=matB.N || matA.M!=matB.M){
127 std::cerr <<
"[ERROR] operator+(dgematrix&, dgbmatrix&)" << std::endl
128 <<
"These two matrises can not make a summation." << std::endl
129 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
130 << matB.M <<
"x" << matB.N <<
")." << std::endl;
137 for(
long i=0; i<matB.M; i++){
138 for(
long j=
max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
139 newmat(i,j)+=matB(i,j);
151 std::cerr <<
"# [MARK] operator-(const dgematrix&, const dgbmatrix&)"
156 if(matA.N!=matB.N || matA.M!=matB.M){
157 std::cerr <<
"[ERROR] operator+(dgematrix&, dgbmatrix&)" << std::endl
158 <<
"These two matrises can not make a summation." << std::endl
159 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
160 << matB.M <<
"x" << matB.N <<
")." << std::endl;
167 for(
long i=0; i<matB.M; i++){
168 for(
long j=
max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
169 newmat(i,j)-=matB(i,j);
181 std::cerr <<
"# [MARK] operator*(const dgematrix&, const dgbmatrix&)"
187 std::cerr <<
"[ERROR] operator*(dgematrix&, dgbmatrix&)" << std::endl
188 <<
"These two matrises can not make a product." << std::endl
189 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
190 << matB.M <<
"x" << matB.N <<
")." << std::endl;
199 #pragma omp parallel for private(j,k)
200 for(i=0; i<newmat.M; i++){
201 for(j=0; j<newmat.N; j++){
202 for(k=
max(0,j-matB.KU); k<min(matB.M,j+matB.KL+1); k++){
203 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
void resize(const long &, const long &)
Definition: dgematrix-misc.hpp:126
friend void swap(dgematrix &, dgematrix &)
Definition: dgematrix-misc.hpp:154
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
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
Real Double-precision General Band Matrix Class.
Definition: dgbmatrix.hpp:3
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.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
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3
double & operator()(const long &, const long &)
Definition: dgematrix-io.hpp:3