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