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

Go to the source code of this file.

Functions

const dgrmatrixoperator+ (const dgrmatrix &mat)
 
dgrmatrix operator- (const dgrmatrix &mat)
 

Function Documentation

const dgrmatrix& operator+ ( const dgrmatrix mat)
inline

+dgrmatrix operator

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

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

-dgrmatrix operator

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

References dgrmatrix::a.

11 {CPPL_VERBOSE_REPORT;
12  dgrmatrix newmat =mat;
13 
14  const std::vector<double>::iterator newmat_a_end =newmat.a.end();
15  for(std::vector<double>::iterator it=newmat.a.begin(); it!=newmat_a_end; it++){
16  (*it) =-(*it);
17  }
18 
19  return newmat;
20 }
std::vector< double > a
matrix component values
Definition: dgrmatrix.hpp:11
Real Double-precision General Compressed Sparse Row (CSR) Matrix Class.
Definition: dgrmatrix.hpp:3