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

Go to the source code of this file.

Functions

const dgsmatrixoperator+ (const dgsmatrix &mat)
 
_dgsmatrix operator- (const dgsmatrix &mat)
 

Function Documentation

const dgsmatrix& operator+ ( const dgsmatrix mat)
inline

+dgsmatrix operator

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

4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
_dgsmatrix operator- ( const dgsmatrix mat)
inline

-dgsmatrix operator

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

References _(), and dgsmatrix::data.

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