CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
zgsmatrix-unary.hpp File Reference

Go to the source code of this file.

Functions

const zgsmatrixoperator+ (const zgsmatrix &mat)
 
_zgsmatrix operator- (const zgsmatrix &mat)
 

Function Documentation

const zgsmatrix& operator+ ( const zgsmatrix mat)
inline

+zgsmatrix operator

Definition at line 3 of file zgsmatrix-unary.hpp.

4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
_zgsmatrix operator- ( const zgsmatrix mat)
inline

-zgsmatrix operator

Definition at line 10 of file zgsmatrix-unary.hpp.

References _(), and zgsmatrix::data.

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
_dcovector _(dcovector &vec)