CPPLapack
 All Classes Files Functions Variables Friends Pages
dgbmatrix-unary.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! +dgbmatrix operator */
3 inline const dgbmatrix& operator+(const dgbmatrix& mat)
4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
7 
8 //=============================================================================
9 /*! -dgbmatrix operator */
10 inline _dgbmatrix operator-(const dgbmatrix& mat)
11 {CPPL_VERBOSE_REPORT;
12  dgbmatrix newmat(mat.m,mat.n,mat.kl,mat.ku);
13  for(CPPL_INT i=0; i<(newmat.kl+newmat.ku+1)*newmat.n; i++){
14  newmat.array[i]=-mat.array[i];
15  }
16 
17  return _(newmat);
18 }
CPPL_INT m
matrix row size
Definition: dgbmatrix.hpp:9
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT kl
lower band width
Definition: dgbmatrix.hpp:11
CPPL_INT ku
upper band width
Definition: dgbmatrix.hpp:12
double * array
1D array to store matrix data
Definition: dgbmatrix.hpp:13
Real Double-precision General Band Matrix Class.
Definition: dgbmatrix.hpp:3
_dgbmatrix operator-(const dgbmatrix &mat)
const dgbmatrix & operator+(const dgbmatrix &mat)
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
_dcovector _(dcovector &vec)