VERB_code_2.3
zhematrix-calc.hpp
1 //=============================================================================
3 inline _zhematrix t(const zhematrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] t(const zhematrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  zhematrix newmat(mat.N);
11  for(long i=0; i<newmat.N; i++){ for(long j=0; j<=i; j++){
12  newmat(i,j) =mat(j,i);
13  }}
14 
15  return _(newmat);
16 }
17 
18 //=============================================================================
20 inline _zgematrix i(const zhematrix& mat)
21 {
22 #ifdef CPPL_VERBOSE
23  std::cerr << "# [MARK] i(const zhematrix&)"
24  << std::endl;
25 #endif//CPPL_VERBOSE
26 
27  zhematrix mat_cp(mat);
28  zgematrix mat_inv(mat.N,mat.N);
29  mat_inv.identity();
30  mat_cp.zhesv(mat_inv);
31 
32  return _(mat_inv);
33 }
34 
38 
39 //=============================================================================
41 inline _zhematrix conj(const zhematrix& mat)
42 {
43 #ifdef CPPL_VERBOSE
44  std::cerr << "# [MARK] conj(const zhematrix&)"
45  << std::endl;
46 #endif//CPPL_VERBOSE
47 
48  zhematrix newmat(mat.N);
49  for(long i=0; i<mat.N; i++){ for(long j=0; j<=i; j++){
50  newmat(i,j) =std::conj(mat(i,j));
51  }}
52 
53  return _(newmat);
54 }
55 
56 //=============================================================================
58 inline _zhematrix conjt(const zhematrix& mat)
59 {
60 #ifdef CPPL_VERBOSE
61  std::cerr << "# [MARK] conjt(const zhematrix&)"
62  << std::endl;
63 #endif//CPPL_VERBOSE
64 
65 #ifdef CPPL_DEBUG
66  std::cerr << "[WARNING] t(const zhematrix&)" << std::endl
67  << "This function call has no effect "
68  << "since the matrix is symmetric." << std::endl;
69 #endif//CPPL_DEBUG
70 
71  zhematrix newmat(mat);
72  return _(newmat);
73 }
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
void identity()
Definition: zgematrix-misc.hpp:38
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
friend _zcovector conjt(const _zrovector &)
Definition: _zrovector-calc.hpp:33
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
friend _zrovector conj(const _zrovector &)
Definition: _zrovector-calc.hpp:20
Complex Double-precision Hermitian Matrix Class [L-type (UPLO=L) Strage].
Definition: zhematrix.hpp:4
friend _zcovector t(const _zrovector &)
Definition: _zrovector-calc.hpp:3
long zhesv(zgematrix &)
Definition: zhematrix-lapack.hpp:6