VERB_code_2.3
_zhematrix-misc.hpp
1 //=============================================================================
3 inline void _zhematrix::destroy() const
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] _zhematrix::destroy() const"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10 #ifdef CPPL_DEBUG
11  std::cerr << "# [NOTE] _zhematrix::destroy() "
12  << " An array at " << Array
13  << " is going to be destroyed." << std::endl;
14 #endif//CPPL_DEBUG
15 
16  delete [] Array;
17  delete [] Darray;
18 }
19 
20 //=============================================================================
22 inline void _zhematrix::complete() const
23 {
24 #ifdef CPPL_VERBOSE
25  std::cerr << "# [MARK] _zhematrix::complete() const"
26  << std::endl;
27 #endif//CPPL_VERBOSE
28 
29  for(long i=0; i<N; i++){
30  for(long j=0; j<i; j++){
31  Darray[i][j] =std::conj(Darray[j][i]);
32  }
33 
34 #ifdef CPPL_DEBUG
35  if(std::fabs(std::imag(operator()(i,i))) > CPPL_EPS){
36  std::cerr << "[WARNING] _zhematrix::complete() const" << std::endl
37  << "The " << i << "th diagonal component of the _zhematrix"
38  << "is not a real number." << std::endl;
39  }
40 #endif//CPPL_DEBUG
41  }
42 }
43 
std::complex< double > * Array
1D Array to store matrix data
Definition: _zhematrix.hpp:8
std::complex< double > ** Darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:9
void complete() const
Definition: _zhematrix-misc.hpp:22
void destroy() const
Definition: _zhematrix-misc.hpp:3
long N
matrix column or row size
Definition: _zhematrix.hpp:7
friend _zgematrix i(const _zhematrix &)
Definition: _zhematrix-calc.hpp:21