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

Go to the source code of this file.

Functions

const dgbmatrixoperator+ (const dgbmatrix &mat)
 
_dgbmatrix operator- (const dgbmatrix &mat)
 

Function Documentation

const dgbmatrix& operator+ ( const dgbmatrix mat)
inline

+dgbmatrix operator

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

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

-dgbmatrix operator

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

References _(), dgbmatrix::array, i(), dgbmatrix::kl, dgbmatrix::ku, dgbmatrix::m, and dgbmatrix::n.

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
CPPL_INT n
matrix column size
Definition: _dgematrix.hpp:10
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
_dcovector _(dcovector &vec)