OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
DoubleEigen.h
Go to the documentation of this file.
1 #ifndef CLASSIC_DoubleEigen_HH
2 #define CLASSIC_DoubleEigen_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: DoubleEigen.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 DoubleEigen
31 // ------------------------------------------------------------------------
33 // Representation of eigenvalues and eigenvectors
34 // for a matrix of type Matrix<double>.
35 
36 class DoubleEigen {
37 
38 public:
39 
41  // Construct the vector of complex eigenvalues for the matrix [b]M[/b].
42  // If [b]vec[/b] is true, the matrix of eigenvectors is also built.
43  DoubleEigen(const Matrix<double> &m, bool vec = false);
44 
45  DoubleEigen();
46  DoubleEigen(const DoubleEigen &);
47  ~DoubleEigen();
48 
50  // Return the eigenvalues as a complex vector.
52 
54  // Return the eigenvectors as the column vectors of a complex matrix.
56 
58  // Return the eigenvectors packed in a real matrix.
59  // Real eigenvectors appear a single column in the same position as
60  // the corresponding real eigenvalue.
61  // Complex eigenvalues occur in conjugate pairs, and the corresponding
62  // eigenvectors appear as two real columns containing the real and
63  // imaginary parts respectively.
65 
66 private:
67 
68  // Not implemented.
69  void operator=(const DoubleEigen &);
70 
71  // Used by eigenvalue and eigenvector routines
72  static void balance(Matrix<double> &, int &low, int &high,
73  Vector<double> &);
74 
75  static void exchange(Matrix<double> &, int j, int m,
76  int low, int high);
77 
78  static void elmhes(Matrix<double> &, int low, int high,
79  Array1D<int> &index);
80 
81  void elmtran(Matrix<double> &, int low, int high,
82  Array1D<int> &index);
83 
84  int hqr(Matrix<double> &, int low, int high);
85 
86  int hqr2(Matrix<double> &, int low, int high);
87 
88  void balbak(int low, int high, Vector<double> &scale);
89 
90  // Representation of the eigenvalues and eigenvectors.
93 };
94 
95 #endif // CLASSIC_DoubleEigen_HH
static void balance(Matrix< double > &, int &low, int &high, Vector< double > &)
Double eigenvector routines.
Definition: DoubleEigen.h:36
MMatrix< m_complex > complex(MMatrix< double > real)
Definition: MMatrix.cpp:407
static void exchange(Matrix< double > &, int j, int m, int low, int high)
Matrix< double > vectors
Definition: DoubleEigen.h:92
Matrix< double > packedEigenVectors() const
Get eigenvectors.
void elmtran(Matrix< double > &, int low, int high, Array1D< int > &index)
Vector< complex< double > > lambda
Definition: DoubleEigen.h:91
Matrix< complex< double > > eigenVectors() const
Get eigenvectors.
int hqr(Matrix< double > &, int low, int high)
int hqr2(Matrix< double > &, int low, int high)
Definition: Vec.h:21
static void elmhes(Matrix< double > &, int low, int high, Array1D< int > &index)
Vector.
Vector< complex< double > > eigenValues() const
Get eigenvalues.
void balbak(int low, int high, Vector< double > &scale)
void operator=(const DoubleEigen &)