6 std::cerr <<
"# [MARK] operator+(const dgbmatrix&, const dsymatrix&)"
11 if(matA.N!=matB.N || matA.M!=matB.N){
12 std::cerr <<
"[ERROR] operator+(dgbmatrix&, dsymatrix&)" << 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;
21 for(
long i=0; i<matA.M; i++){
22 for(
long j=0; j<matB.N; j++){
23 newmat(i,j) = matB(i,j);
25 for(
long j=max(0,i-matA.KL); j<min(matA.N,i+matA.KU+1); j++){
26 newmat(i,j)+=matA(i,j);
38 std::cerr <<
"# [MARK] operator-(const dgbmatrix&, const dsymatrix&)"
43 if(matA.N!=matB.N || matA.M!=matB.N){
44 std::cerr <<
"[ERROR] operator+(dgbmatrix&, dsymatrix&)" << std::endl
45 <<
"These two matrises can not make a summation." << std::endl
46 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
47 << matB.N <<
"x" << matB.N <<
")." << std::endl;
53 for(
long i=0; i<matA.M; i++){
54 for(
long j=0; j<matB.N; j++){
55 newmat(i,j) = -matB(i,j);
57 for(
long j=max(0,i-matA.KL); j<min(matA.N,i+matA.KU+1); j++){
58 newmat(i,j) += matA(i,j);
70 std::cerr <<
"# [MARK] operator*(const dgbmatrix&, const dsymatrix&)"
76 std::cerr <<
"[ERROR] operator*(dgbmatrix&, dsymatrix&)" << std::endl
77 <<
"These two matrises can not make a product." << std::endl
78 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
79 << matB.N <<
"x" << matB.N <<
")." << std::endl;
88 #pragma omp parallel for private(j,k)
89 for(i=0; i<newmat.
m; i++){
90 for(j=0; j<newmat.
n; j++){
91 for(k=max(0,i-matA.KL); k<min(matA.N,i+matA.KU+1); k++){
92 newmat(i,j)+=matA(i,k)*matB(k,j);
void zero()
Definition: dgematrix-misc.hpp:26
long const & n
matrix column size (readable)
Definition: dgematrix.hpp:15
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
Real Double-precision Symmetric Matrix Class [L-type (UPLO=L) Strage].
Definition: dsymatrix.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
Real Double-precision General Band Matrix Class.
Definition: dgbmatrix.hpp:3
long const & m
matrix row size (readable)
Definition: dgematrix.hpp:14
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3