OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ComplexEigen.h
Go to the documentation of this file.
1 #ifndef CLASSIC_ComplexEigen_HH
2 #define CLASSIC_ComplexEigen_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: ComplexEigen.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class ComplexEigen:
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Algebra
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:32 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "Algebra/Matrix.h"
24 #include "Algebra/Vector.h"
25 #include <complex>
26 
27 using std::complex;
28 
29 
30 // Class ComplexEigen
31 // ------------------------------------------------------------------------
33 // Representation of eigenvalues and eigenvectors
34 // for a matrix of type Matrix<complex<double> >.
35 
36 class ComplexEigen {
37 
38 public:
39 
41  // Construct the vector of eigenvalues for the matrix [b]M[/b].
42  // If [b]vec[/b] is true, the matrix of eigenvectors is also built.
43  ComplexEigen(const Matrix<complex<double> > &m, bool vec = false);
44 
45  ComplexEigen();
46  ComplexEigen(const ComplexEigen &);
47  ~ComplexEigen();
48 
50  // Return the eigenvalues as a complex vector.
51  const Vector<complex<double> > &eigenValues() const;
52 
54  // Return the eigenvectors as the column vectors of a complex matrix.
55  const Matrix<complex<double> > &eigenVectors() const;
56 
57 private:
58 
59  // Not implemented.
60  void operator=(const ComplexEigen &);
61 
62  // Used by eigenvalue and eigenvector routines
63  static void balance
64  (Matrix<complex<double> > &, int &low, int &high, Array1D<double> &);
65 
66  void balbak(int low, int high, const Array1D<double> &scale);
67 
68  static void exchange(Matrix<complex<double> > &, int j, int m,
69  int low, int high);
70 
71  int hqr(Matrix<complex<double> > &, int low, int high);
72 
73  int hqr2(Matrix<complex<double> > &, int low, int high,
74  Array1D<complex<double> > &ort);
75 
76  static void orthes(Matrix<complex<double> > &, int low, int high,
77  Array1D<complex<double> > &ort);
78 
79  // Representation of the eigenvalues and eigenvectors.
82 };
83 
84 #endif // CLASSIC_ComplexEigen_HH
Matrix< complex< double > > vectors
Definition: ComplexEigen.h:81
Complex eigenvector routines.
Definition: ComplexEigen.h:36
MMatrix< m_complex > complex(MMatrix< double > real)
Definition: MMatrix.cpp:407
const Matrix< complex< double > > & eigenVectors() const
Get eigenvectors.
const Vector< complex< double > > & eigenValues() const
Get eigenvalues.
static void balance(Matrix< complex< double > > &, int &low, int &high, Array1D< double > &)
int hqr(Matrix< complex< double > > &, int low, int high)
static void exchange(Matrix< complex< double > > &, int j, int m, int low, int high)
void operator=(const ComplexEigen &)
Definition: Vec.h:21
Vector< complex< double > > lambda
Definition: ComplexEigen.h:80
Matrix.
Definition: Matrix.h:38
Vector.
void balbak(int low, int high, const Array1D< double > &scale)
int hqr2(Matrix< complex< double > > &, int low, int high, Array1D< complex< double > > &ort)
static void orthes(Matrix< complex< double > > &, int low, int high, Array1D< complex< double > > &ort)