CPPLapack
 All Classes Files Functions Variables Friends Pages
dssmatrix-unary.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! +dssmatrix operator */
3 inline const dssmatrix& operator+(const dssmatrix& mat)
4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
7 
8 //=============================================================================
9 /*! -dssmatrix operator */
10 inline _dssmatrix operator-(const dssmatrix& mat)
11 {CPPL_VERBOSE_REPORT;
12  dssmatrix newmat(mat);
13 
14  const std::vector<dcomponent>::iterator newmat_data_end =newmat.data.end();
15  for(std::vector<dcomponent>::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){
16  it->v =-it->v;
17  }
18 
19  return _(newmat);
20 }
std::vector< dcomponent > data
matrix data
Definition: dssmatrix.hpp:11
const dssmatrix & operator+(const dssmatrix &mat)
(DO NOT USE) Smart-temporary Real Double-precision Symmetric Sparse Matrix Class
Definition: _dssmatrix.hpp:3
_dssmatrix operator-(const dssmatrix &mat)
Real Double-precision Symmetric Sparse Matrix Class.
Definition: dssmatrix.hpp:3
_dcovector _(dcovector &vec)