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  const std::vector<dcomponent>::iterator mat_data_end =mat.data.end();
13  for(std::vector<dcomponent>::iterator it=mat.data.begin(); it!=mat_data_end; it++){
14  it->v = -it->v;
15  }
16 
17  return mat;
18 }
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
Definition: _dgsmatrix.hpp:3
std::vector< dcomponent > data
matrix data
Definition: _dgsmatrix.hpp:11
const _dgsmatrix & operator+(const _dgsmatrix &mat)
_dgsmatrix operator-(const _dgsmatrix &mat)