My Project
_dgbmatrix-unary.hpp
1 //=============================================================================
3 inline const _dgbmatrix& operator+(const _dgbmatrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator+(const _dgbmatrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  return mat;
11 }
12 
13 //=============================================================================
15 inline _dgbmatrix operator-(const _dgbmatrix& mat)
16 {
17 #ifdef CPPL_VERBOSE
18  std::cerr << "# [MARK] operator-(const _dgbmatrix&)"
19  << std::endl;
20 #endif//CPPL_VERBOSE
21 
22  for(long i=0; i<(mat.KL+mat.KU+1)*mat.N; i++){
23  mat.Array[i]=-mat.Array[i];
24  }
25 
26  return mat;
27 }
long KL
lower band width
Definition: _dgbmatrix.hpp:9
long N
matrix column size
Definition: _dgbmatrix.hpp:8
double * Array
1D Array to store matrix data
Definition: _dgbmatrix.hpp:11
friend _drovector operator-(const _drovector &)
Definition: _drovector-unary.hpp:15
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
long KU
upper band width
Definition: _dgbmatrix.hpp:10
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3