My Project
zhematrix-complex.hpp
1 //=============================================================================
3 inline _zgematrix operator*(const zhematrix& mat, const std::complex<double>& d)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator*(const zhematrix&, const std::complex<double>&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  mat.complete();
11  zgematrix newmat(mat.N, mat.N);
12  for(long i=0; i<mat.N*mat.N; i++){ newmat.array[i] =mat.Array[i]*d; }
13 
14  return _(newmat);
15 }
16 
17 //=============================================================================
19 inline _zgematrix operator/(const zhematrix& mat, const std::complex<double>& d)
20 {
21 #ifdef CPPL_VERBOSE
22  std::cerr << "# [MARK] operator/(const zhematrix&, const std::complex<double>&)"
23  << std::endl;
24 #endif//CPPL_VERBOSE
25 
26  std::complex<double> inv_d(1./d);
27 
28  mat.complete();
29  zgematrix newmat(mat.N, mat.N);
30  for(long i=0; i<mat.N*mat.N; i++){ newmat.array[i] =mat.Array[i]*inv_d; }
31 
32  return _(newmat);
33 }
friend _zrovector operator/(const zrovector &, const double &)
Definition: zrovector-double.hpp:48
void complete() const
Definition: zhematrix-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
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
Complex Double-precision Hermitian Matrix Class [L-type (UPLO=L) Strage].
Definition: zhematrix.hpp:4