VERB_code_2.3
_dgematrix-cast.hpp
1 //============================================================================
3 inline _dgematrix::operator _zgematrix()
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] _dgematrix::operator _zgematrix()"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  zgematrix newmat(M,N);
11  for(long i=0; i<M*N; i++){
12  newmat.array[i] =std::complex<double>(Array[i],0.0);
13  }
14 
15 #ifdef CPPL_DEBUG
16  std::cerr << "# [NOTE] _dgematrix::operator _zgematrix() "
17  << "A new casted matrix at " << newmat.array
18  << " has been made." << std::endl;
19 #endif//CPPL_DEBUG
20 
21  destroy();
22  return _(newmat);
23 }
void destroy() const
Definition: _drovector-misc.hpp:3
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
double * Array
1D Array to store vector data
Definition: _drovector.hpp:8
std::complex< double > *const & array
1D array to store matrix data (readable)
Definition: zgematrix.hpp:16