CPPLapack
 All Classes Files Functions Variables Friends Pages
dgrmatrix-unary.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! +dgrmatrix operator */
3 inline const dgrmatrix& operator+(const dgrmatrix& mat)
4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
7 
8 //=============================================================================
9 /*! -dgrmatrix operator */
10 inline dgrmatrix operator-(const dgrmatrix& mat)
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 }
dgrmatrix operator-(const dgrmatrix &mat)
std::vector< double > a
matrix component values
Definition: dgrmatrix.hpp:11
const dgrmatrix & operator+(const dgrmatrix &mat)
Real Double-precision General Compressed Sparse Row (CSR) Matrix Class.
Definition: dgrmatrix.hpp:3