6 std::cerr <<
"# [MARK] zssmatrix::operator=(const zssmatrix&)"
25 std::cerr <<
"# [MARK] zssmatrix::operator+=(const zssmatrix&)"
30 if(N!=mat.N || M!=mat.M){
31 std::cerr <<
"[ERROR] zssmatrix::operator+=(const zssmatrix&)"
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] zssmatrix::operator-=(const zssmatrix&)"
56 if(N!=mat.N || M!=mat.M){
57 std::cerr <<
"[ERROR] zssmatrix::operator-=(const zssmatrix&)"
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] zssmatrix::operator*=(const zssmatrix&)"
83 std::cerr <<
"[ERROR] zssmatrix::operator*=(const zssmatrix&)"
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 zssmatrix&, const zssmatrix&)"
120 if(matA.N!=matB.N || matA.M!=matB.M){
121 std::cerr <<
"[ERROR] operator+(zssmatrix&, zssmatrix&)" << 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 zssmatrix&, const zssmatrix&)"
148 if(matA.N!=matB.N || matA.M!=matB.M){
149 std::cerr <<
"[ERROR] operator-(zssmatrix&, zssmatrix&)" << 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 zssmatrix&, const zssmatrix&)"
177 std::cerr <<
"[ERROR] operator*(zssmatrix&, zssmatrix&)" << 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]);
zssmatrix & operator-=(const zssmatrix &)
Definition: zssmatrix-zssmatrix.hpp:48
(DO NOT USE) Smart-temporary Complex Double-precision Sparse Matrix Class
Definition: _zssmatrix.hpp:3
void add(const long &, const long &, const std::complex< double > &)
Definition: zssmatrix-io.hpp:120
zssmatrix & operator*=(const zssmatrix &)
Definition: zssmatrix-zssmatrix.hpp:74
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
void copy(const zssmatrix &)
Definition: zssmatrix-misc.hpp:48
friend void swap(zssmatrix &, zssmatrix &)
Definition: zssmatrix-misc.hpp:228
void sub(const long &, const long &, const std::complex< double > &)
Definition: zssmatrix-io.hpp:157
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
zssmatrix & operator=(const zssmatrix &)
Definition: zssmatrix-zssmatrix.hpp:3
Complex Double-precision Sparse Matrix Class.
Definition: zssmatrix.hpp:3
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3
zssmatrix & operator+=(const zssmatrix &)
Definition: zssmatrix-zssmatrix.hpp:22
std::complex< double > * Array
1D Array to store vector data
Definition: _zrovector.hpp:8