CHROMA
eigeninfo.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Hold eigenvalues and eigenvectors
4  */
5 
6 #ifndef EIGENSTATE_H
7 #define EIGENSTATE_H
8 
9 
10 namespace Chroma
11 {
12 
13  //! Hold eigenvalues and eigenvectors
14  /*!
15  * \ingroup ferm
16  */
17  template<typename T>
18  class EigenInfo
19  {
20  public:
21  //! Partial constructor
22  EigenInfo() {}
23 
24  //! Full constructor
25  EigenInfo(const multi1d<Real>& eval, const Real& l, const multi1d<T>& evec)
26  : evalues(eval), largest(l), evectors(evec) {
27  if (eval.size() != evec.size() ) {
28  QDPIO::cout << "Eval array size not equal to evec array size" << std::endl;
29  QDP_abort(1);
30  }
31  }
32 
33  //! Destructor
35 
36  //! Copy constructor
38  if (e.evalues.size() != e.evectors.size() ) {
39  QDPIO::cout << "Eval array size not equal to evec array size" << std::endl;
40  QDP_abort(1);
41  }
42  }
43 
44  //! Getter
45  const multi1d<Real>& getEvalues() const {return evalues;}
46  //! Setter
47  multi1d<Real>& getEvalues() {return evalues;}
48 
49  //! Getter
50  const Real& getLargest() const {return largest;}
51  //! Setter
52  Real& getLargest() {return largest;}
53 
54  //! Getter
55  const multi1d<T>& getEvectors() const {return evectors;}
56  //! Setter
57  multi1d<T>& getEvectors() {return evectors;}
58 
59  private:
60  multi1d<Real> evalues;
61  multi1d<T> evectors;
62  Real largest;
63  };
64 }
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 #endif
Hold eigenvalues and eigenvectors.
Definition: eigeninfo.h:19
EigenInfo(const multi1d< Real > &eval, const Real &l, const multi1d< T > &evec)
Full constructor.
Definition: eigeninfo.h:25
EigenInfo()
Partial constructor.
Definition: eigeninfo.h:22
multi1d< T > & getEvectors()
Setter.
Definition: eigeninfo.h:57
const Real & getLargest() const
Getter.
Definition: eigeninfo.h:50
const multi1d< T > & getEvectors() const
Getter.
Definition: eigeninfo.h:55
const multi1d< Real > & getEvalues() const
Getter.
Definition: eigeninfo.h:45
multi1d< Real > & getEvalues()
Setter.
Definition: eigeninfo.h:47
multi1d< T > evectors
Definition: eigeninfo.h:61
EigenInfo(const EigenInfo &e)
Copy constructor.
Definition: eigeninfo.h:37
multi1d< Real > evalues
Definition: eigeninfo.h:60
Real & getLargest()
Setter.
Definition: eigeninfo.h:52
~EigenInfo()
Destructor.
Definition: eigeninfo.h:34
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int l
Definition: pade_trln_w.cc:111