CPPLapack
 All Classes Files Functions Variables Friends Pages
dgsmatrix-unary.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! +dgsmatrix operator */
3 inline const dgsmatrix& operator+(const dgsmatrix& mat)
4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
7 
8 //=============================================================================
9 /*! -dgsmatrix operator */
10 inline _dgsmatrix operator-(const dgsmatrix& mat)
11 {CPPL_VERBOSE_REPORT;
12  dgsmatrix 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 }
Real Double-precision General Sparse Matrix Class.
Definition: dgsmatrix.hpp:3
std::vector< dcomponent > data
matrix data
Definition: dgsmatrix.hpp:11
_dgsmatrix operator-(const dgsmatrix &mat)
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
Definition: _dgsmatrix.hpp:3
const dgsmatrix & operator+(const dgsmatrix &mat)
_dcovector _(dcovector &vec)