6 std::cerr <<
"# [MARK] dssmatrix::operator=(const dssmatrix&)"
25 std::cerr <<
"# [MARK] dssmatrix::operator+=(const dssmatrix&)"
30 if(N!=mat.N || M!=mat.M){
31 std::cerr <<
"[ERROR] dssmatrix::operator+=(const dssmatrix&)"
33 <<
"These two matrises can not make a summation." << std::endl
34 <<
"Your input was (" << M <<
"x" << N <<
") += ("
35 << mat.M <<
"x" << mat.N <<
")." << std::endl;
40 for(
long c=0; c<mat.VOL; c++){
41 add(mat.Indx[c],mat.Jndx[c], mat.Array[c]);
51 std::cerr <<
"# [MARK] dssmatrix::operator-=(const dssmatrix&)"
56 if(N!=mat.N || M!=mat.M){
57 std::cerr <<
"[ERROR] dssmatrix::operator-=(const dssmatrix&)"
59 <<
"These two matrises can not make a sutraction." << std::endl
60 <<
"Your input was (" << M <<
"x" << N <<
") -= ("
61 << mat.M <<
"x" << mat.N <<
")." << std::endl;
66 for(
long c=0; c<mat.VOL; c++){
67 sub(mat.Indx[c],mat.Jndx[c], mat.Array[c]);
77 std::cerr <<
"# [MARK] dssmatrix::operator*=(const dssmatrix&)"
83 std::cerr <<
"[ERROR] dssmatrix::operator*=(const dssmatrix&)"
85 <<
"These two matrises can not make a product." << std::endl
86 <<
"Your input was (" << M <<
"x" << N <<
") *= ("
87 << mat.M <<
"x" << mat.N <<
")." << std::endl;
94 for(
long c=0; c<VOL; c++){
95 for(
long d=0; d<mat.VOL; d++){
96 if(Jndx[c]==mat.Indx[d]){
97 newmat.
add(Indx[c], mat.Jndx[d],
Array[c]*mat.Array[d]);
115 std::cerr <<
"# [MARK] operator+(const dssmatrix&, const dssmatrix&)"
120 if(matA.N!=matB.N || matA.M!=matB.M){
121 std::cerr <<
"[ERROR] operator+(dssmatrix&, dssmatrix&)" << std::endl
122 <<
"These two matrises can not make a summation." << std::endl
123 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
124 << matB.M <<
"x" << matB.N <<
")." << std::endl;
131 for(
long c=0; c<matB.VOL; c++){
132 newmat.
add(matB.Indx[c], matB.Jndx[c], matB.Array[c]);
143 std::cerr <<
"# [MARK] operator-(const dssmatrix&, const dssmatrix&)"
148 if(matA.N!=matB.N || matA.M!=matB.M){
149 std::cerr <<
"[ERROR] operator-(dssmatrix&, dssmatrix&)" << std::endl
150 <<
"These two matrises can not make a subtraction." << std::endl
151 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") - ("
152 << matB.M <<
"x" << matB.N <<
")." << std::endl;
159 for(
long c=0; c<matB.VOL; c++){
160 newmat.
sub(matB.Indx[c], matB.Jndx[c], matB.Array[c]);
171 std::cerr <<
"# [MARK] operator*(const dssmatrix&, const dssmatrix&)"
177 std::cerr <<
"[ERROR] operator*(dssmatrix&, dssmatrix&)" << std::endl
178 <<
"These two matrises can not make a product." << std::endl
179 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
180 << matB.M <<
"x" << matB.N <<
")." << std::endl;
187 for(
long c=0; c<matA.VOL; c++){
188 for(
long d=0; d<matB.VOL; d++){
189 if(matA.Jndx[c]==matB.Indx[d]){
190 newmat.
add(matA.Indx[c], matB.Jndx[d], matA.Array[c]*matB.Array[d]);
void copy(const dssmatrix &)
Definition: dssmatrix-misc.hpp:48
(DO NOT USE) Smart-temporary Real Double-precision Sparse Matrix Class
Definition: _dssmatrix.hpp:3
friend void swap(dssmatrix &, dssmatrix &)
Definition: dssmatrix-misc.hpp:228
dssmatrix & operator+=(const dssmatrix &)
Definition: dssmatrix-dssmatrix.hpp:22
double * Array
1D Array to store vector data
Definition: _drovector.hpp:8
friend _drovector operator-(const _drovector &)
Definition: _drovector-unary.hpp:15
void sub(const long &, const long &, const double &)
Definition: dssmatrix-io.hpp:157
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
dssmatrix & operator=(const dssmatrix &)
Definition: dssmatrix-dssmatrix.hpp:3
void add(const long &, const long &, const double &)
Definition: dssmatrix-io.hpp:120
dssmatrix & operator-=(const dssmatrix &)
Definition: dssmatrix-dssmatrix.hpp:48
Real Double-precision Sparse Matrix Class.
Definition: dssmatrix.hpp:3
dssmatrix & operator*=(const dssmatrix &)
Definition: dssmatrix-dssmatrix.hpp:74
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3