CPPLapack
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Public Attributes | List of all members
zhecomplex Class Reference

(DO NOT USE) Complex-double Class for Hermitian matrices More...

#include <zhecomplex.hpp>

Inheritance diagram for zhecomplex:

Public Member Functions

 zhecomplex (const CPPL_INT &, const CPPL_INT &, comple &)
 
zhecomplexoperator= (const comple &)
 
zhecomplexoperator+= (const comple &)
 
zhecomplexoperator-= (const comple &)
 
zhecomplexoperator*= (const comple &)
 

Public Attributes

CPPL_INT i
 
CPPL_INT j
 
comple & v
 

Detailed Description

(DO NOT USE) Complex-double Class for Hermitian matrices

Definition at line 3 of file zhecomplex.hpp.

Constructor & Destructor Documentation

zhecomplex::zhecomplex ( const CPPL_INT &  _i,
const CPPL_INT &  _j,
comple &  _v 
)
inline

constructor

Definition at line 32 of file zhecomplex.hpp.

References i, and j.

33  : comple( _i < _j ? std::conj( _v ) : _v ),
34  v( _v )
35 {CPPL_VERBOSE_REPORT;
36  i = _i;
37  j = _j;
38 }
CPPL_INT j
Definition: zhecomplex.hpp:9
_zcovector conj(const _zcovector &vec)
comple & v
Definition: zhecomplex.hpp:10
CPPL_INT i
Definition: zhecomplex.hpp:9

Member Function Documentation

zhecomplex & zhecomplex::operator= ( const comple &  _v)
inline

operator=

Definition at line 46 of file zhecomplex.hpp.

References conj(), i, j, and v.

47 {CPPL_VERBOSE_REPORT;
48 #ifdef CPPL_DEBUG
49  if( i==j && std::fabs(_v.imag()) > DBL_MIN ){
50  WARNING_REPORT;
51  std::cerr << "Diagonal components of a hermitian matrix have to be real numbers." << std::endl
52  << "Your input to the (" << i << "," << j << ") element was a complex number, " << _v << "." << std::endl;
53  }
54 #endif//CPPL_DEBUG
55 
56  //comple::operator=( _v );
57  //v = ( i < j ? std::conj( _v ) : _v );
58  if(i>=j){
59  v =_v;
60  }
61  else{//i<j
62  v =std::conj(_v);
63  }
64  return *this;
65 }
CPPL_INT j
Definition: zhecomplex.hpp:9
_zcovector conj(const _zcovector &vec)
comple & v
Definition: zhecomplex.hpp:10
CPPL_INT i
Definition: zhecomplex.hpp:9
zhecomplex & zhecomplex::operator+= ( const comple &  _v)
inline

operator+=

Definition at line 69 of file zhecomplex.hpp.

References conj(), i, j, and v.

70 {CPPL_VERBOSE_REPORT;
71 #ifdef CPPL_DEBUG
72  if( i==j && std::fabs(_v.imag()) > DBL_MIN ){
73  WARNING_REPORT;
74  std::cerr << "Diagonal components of a hermitian matrix have to be real numbers." << std::endl
75  << "Your input to the (" << i << "," << j << ") element was a complex number, " << _v << "." << std::endl;
76  }
77 #endif//CPPL_DEBUG
78 
79  if(i>=j){
80  v +=_v;
81  }
82  else{//i<j
83  v +=std::conj(_v);
84  }
85  return *this;
86 }
CPPL_INT j
Definition: zhecomplex.hpp:9
_zcovector conj(const _zcovector &vec)
comple & v
Definition: zhecomplex.hpp:10
CPPL_INT i
Definition: zhecomplex.hpp:9
zhecomplex & zhecomplex::operator-= ( const comple &  _v)
inline

operator-=

Definition at line 90 of file zhecomplex.hpp.

References conj(), i, j, and v.

91 {CPPL_VERBOSE_REPORT;
92 #ifdef CPPL_DEBUG
93  if( i==j && std::fabs(_v.imag()) > DBL_MIN ){
94  WARNING_REPORT;
95  std::cerr << "Diagonal components of a hermitian matrix have to be real numbers." << std::endl
96  << "Your input to the (" << i << "," << j << ") element was a complex number, " << _v << "." << std::endl;
97  }
98 #endif//CPPL_DEBUG
99 
100  if(i>=j){
101  v -=_v;
102  }
103  else{//i<j
104  v -=std::conj(_v);
105  }
106  return *this;
107 }
CPPL_INT j
Definition: zhecomplex.hpp:9
_zcovector conj(const _zcovector &vec)
comple & v
Definition: zhecomplex.hpp:10
CPPL_INT i
Definition: zhecomplex.hpp:9
zhecomplex & zhecomplex::operator*= ( const comple &  _v)
inline

operator*=

Definition at line 111 of file zhecomplex.hpp.

References conj(), i, j, and v.

112 {CPPL_VERBOSE_REPORT;
113 #ifdef CPPL_DEBUG
114  if( i==j && std::fabs(_v.imag()) > DBL_MIN ){
115  WARNING_REPORT;
116  std::cerr << "Diagonal components of a hermitian matrix have to be real numbers." << std::endl
117  << "Your input to the (" << i << "," << j << ") element was a complex number, " << _v << "." << std::endl;
118  }
119 #endif//CPPL_DEBUG
120 
121  if(i>=j){
122  v *=_v;
123  }
124  else{//i<j
125  v *=std::conj(_v);
126  }
127  return *this;
128 }
CPPL_INT j
Definition: zhecomplex.hpp:9
_zcovector conj(const _zcovector &vec)
comple & v
Definition: zhecomplex.hpp:10
CPPL_INT i
Definition: zhecomplex.hpp:9

Member Data Documentation

CPPL_INT zhecomplex::i

Definition at line 9 of file zhecomplex.hpp.

Referenced by operator*=(), operator+=(), operator-=(), operator=(), and zhecomplex().

CPPL_INT zhecomplex::j

Definition at line 9 of file zhecomplex.hpp.

Referenced by operator*=(), operator+=(), operator-=(), operator=(), and zhecomplex().

comple& zhecomplex::v

Definition at line 10 of file zhecomplex.hpp.

Referenced by operator*=(), operator+=(), operator-=(), and operator=().


The documentation for this class was generated from the following file: