VERB_code_2.3
_dssmatrix-unary.hpp
1 //=============================================================================
3 inline const _dssmatrix& operator+(const _dssmatrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator+(const _dssmatrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  return mat;
11 }
12 
13 //=============================================================================
15 inline _dssmatrix operator-(const _dssmatrix& mat)
16 {
17 #ifdef CPPL_VERBOSE
18  std::cerr << "# [MARK] operator-(const _dssmatrix&)"
19  << std::endl;
20 #endif//CPPL_VERBOSE
21 
22  for(long i=0; i<mat.VOL; i++){
23  mat.Array[i] =-mat.Array[i];
24  }
25 
26  return mat;
27 }
(DO NOT USE) Smart-temporary Real Double-precision Sparse Matrix Class
Definition: _dssmatrix.hpp:3
double * Array
1D array to store non-zero matrix data
Definition: _dssmatrix.hpp:11
long VOL
the number of non-zero components
Definition: _dssmatrix.hpp:10
friend const drovector & operator+(const drovector &)
Definition: drovector-unary.hpp:3
friend _drovector operator-(const drovector &)
Definition: drovector-unary.hpp:15