VERB_code_2.3
_zhematrix-unary.hpp
1 //=============================================================================
3 inline const _zhematrix& operator+(const _zhematrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator+(const _zhematrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  return mat;
11 }
12 
13 //=============================================================================
15 inline _zhematrix operator-(const _zhematrix& mat)
16 {
17 #ifdef CPPL_VERBOSE
18  std::cerr << "# [MARK] operator-(const _zhematrix&)"
19  << std::endl;
20 #endif//CPPL_VERBOSE
21 
22  for(long i=0; i<mat.N; i++){ for(long j=0; j<=i; j++){
23  mat.Array[i+mat.N*j]=-mat.Array[i+mat.N*j];
24  }}
25 
26  return mat;
27 }
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
std::complex< double > * Array
1D Array to store matrix data
Definition: _zhematrix.hpp:8
long N
matrix column or row size
Definition: _zhematrix.hpp:7
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3