My Project
zssmatrix-unary.hpp
1 //=============================================================================
3 inline const zssmatrix& operator+(const zssmatrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator+(const zssmatrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  return mat;
11 }
12 
13 //=============================================================================
15 inline _zssmatrix operator-(const zssmatrix& mat)
16 {
17 #ifdef CPPL_VERBOSE
18  std::cerr << "# [MARK] operator-(const zssmatrix&)"
19  << std::endl;
20 #endif//CPPL_VERBOSE
21 
22  zssmatrix newmat(mat.M,mat.N,mat.CAP);
23 
24  newmat.VOL=mat.VOL;
25  for(long i=0; i<mat.VOL; i++){
26  newmat.Array[i] =-mat.Array[i];
27  newmat.Indx[i] =mat.Indx[i];
28  newmat.Jndx[i] =mat.Jndx[i];
29  }
30 
31  return _(newmat);
32 }
(DO NOT USE) Smart-temporary Complex Double-precision Sparse Matrix Class
Definition: _zssmatrix.hpp:3
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
Complex Double-precision Sparse Matrix Class.
Definition: zssmatrix.hpp:3
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3