Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gammaMatrix.h
Go to the documentation of this file.
1 
14 #ifndef GAMMAMATRIX_INCLUDED
15 #define GAMMAMATRIX_INCLUDED
16 
17 //#include <complex>
18 
20 
21 #include "bridge_complex.h"
22 //typedef std::complex<double> dcomplex;
23 //typedef std::complex<int> icomplex;
24 
26 
44 class GammaMatrix {
45  public:
46  static const std::string class_name;
47 
48  private:
49  int m_Nd;
50  std::vector<int> m_gmindex; // b=m_gmindex[a] if \gamma_{ab} \not=0 (SA)
51  std::vector<icomplex> m_gmval_i; // \gamma_{ab} in complex<int> (SA)
52  std::vector<dcomplex> m_gmvalue; // \gamma_{ab} in complex<double> (SA)
53  std::vector<int> m_gmindex_c; // =1(0) if m_gmval_i[a] is pure imaginary(real) (SA)
54  std::vector<double> m_gmvalue_r;
55  std::vector<double> m_gmvalue_i;
56 
57  protected:
59  public:
61  {
63  m_gmindex.resize(m_Nd);
64  m_gmval_i.resize(m_Nd);
65  m_gmvalue.resize(m_Nd);
66  m_gmindex_c.resize(m_Nd);
67  m_gmvalue_r.resize(m_Nd);
68  m_gmvalue_i.resize(m_Nd);
69  }
70 
71  void set(int row, int index, icomplex val_i);
72 
73  void set_values(int row);
74 
75  void print();
76 
78 
80 
81  GammaMatrix mult(int) const;
82 
83  int index(int row) const
84  {
85  return m_gmindex[row];
86  }
87 
88  dcomplex value(int row) const
89  {
90  return m_gmvalue[row];
91  }
92 
93  int index_c(int row) const
94  {
95  return m_gmindex_c[row];
96  }
97 
98  double value_r(int row) const
99  {
100  return m_gmvalue_r[row];
101  }
102 
103  double value_i(int row) const
104  {
105  return m_gmvalue_i[row];
106  }
107 };
108 #endif
std::vector< dcomplex > m_gmvalue
Definition: gammaMatrix.h:52
std::vector< double > m_gmvalue_i
Definition: gammaMatrix.h:55
std::vector< int > m_gmindex_c
Definition: gammaMatrix.h:53
void set_values(int row)
static const std::string class_name
Definition: gammaMatrix.h:46
void set(int row, int index, icomplex val_i)
Definition: gammaMatrix.cpp:26
Gamma Matrix class.
Definition: gammaMatrix.h:44
double value_r(int row) const
Definition: gammaMatrix.h:98
std::vector< int > m_gmindex
Definition: gammaMatrix.h:50
GammaMatrix mult_i(GammaMatrix) const
Definition: gammaMatrix.cpp:59
Common parameter class: provides parameters as singleton.
std::vector< double > m_gmvalue_r
Definition: gammaMatrix.h:54
GammaMatrix mult(GammaMatrix) const
Definition: gammaMatrix.cpp:39
int index_c(int row) const
Definition: gammaMatrix.h:93
VerboseLevel
Definition: bridgeIO.h:42
Bridge::VerboseLevel m_vl
Definition: gammaMatrix.h:58
std::vector< icomplex > m_gmval_i
Definition: gammaMatrix.h:51
double value_i(int row) const
Definition: gammaMatrix.h:103
dcomplex value(int row) const
Definition: gammaMatrix.h:88
int index(int row) const
Definition: gammaMatrix.h:83
void print()
Definition: gammaMatrix.cpp:77