00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined (octave_EIG_h)
00025 #define octave_EIG_h 1
00026
00027 #include <iosfwd>
00028
00029 #include "dMatrix.h"
00030 #include "CMatrix.h"
00031 #include "CColVector.h"
00032
00033 class
00034 OCTAVE_API
00035 EIG
00036 {
00037 friend class Matrix;
00038 friend class ComplexMatrix;
00039
00040 public:
00041
00042 EIG (void)
00043 : lambda (), v () { }
00044
00045 EIG (const Matrix& a, bool calc_eigenvectors = true)
00046 { init (a, calc_eigenvectors); }
00047
00048 EIG (const Matrix& a, octave_idx_type& info, bool calc_eigenvectors = true)
00049 { info = init (a, calc_eigenvectors); }
00050
00051 EIG (const Matrix& a, const Matrix& b, bool calc_eigenvectors = true)
00052 { init (a, b, calc_eigenvectors); }
00053
00054 EIG (const Matrix& a, const Matrix& b, octave_idx_type& info, bool calc_eigenvectors = true)
00055 { info = init (a, b, calc_eigenvectors); }
00056
00057 EIG (const ComplexMatrix& a, bool calc_eigenvectors = true)
00058 { init (a, calc_eigenvectors); }
00059
00060 EIG (const ComplexMatrix& a, octave_idx_type& info, bool calc_eigenvectors = true)
00061 { info = init (a, calc_eigenvectors); }
00062
00063 EIG (const ComplexMatrix& a, const ComplexMatrix& b, bool calc_eigenvectors = true)
00064 { init (a, b, calc_eigenvectors); }
00065
00066 EIG (const ComplexMatrix& a, const ComplexMatrix& b, octave_idx_type& info, bool calc_eigenvectors = true)
00067 { info = init (a, b, calc_eigenvectors); }
00068
00069 EIG (const EIG& a)
00070 : lambda (a.lambda), v (a.v) { }
00071
00072 EIG& operator = (const EIG& a)
00073 {
00074 if (this != &a)
00075 {
00076 lambda = a.lambda;
00077 v = a.v;
00078 }
00079 return *this;
00080 }
00081
00082 ~EIG (void) { }
00083
00084 ComplexColumnVector eigenvalues (void) const { return lambda; }
00085
00086 ComplexMatrix eigenvectors (void) const { return v; }
00087
00088 friend std::ostream& operator << (std::ostream& os, const EIG& a);
00089
00090 private:
00091
00092 ComplexColumnVector lambda;
00093 ComplexMatrix v;
00094
00095 octave_idx_type init (const Matrix& a, bool calc_eigenvectors);
00096 octave_idx_type init (const Matrix& a, const Matrix& b, bool calc_eigenvectors);
00097 octave_idx_type init (const ComplexMatrix& a, bool calc_eigenvectors);
00098 octave_idx_type init (const ComplexMatrix& a, const ComplexMatrix& b, bool calc_eigenvectors);
00099
00100 octave_idx_type symmetric_init (const Matrix& a, bool calc_eigenvectors);
00101 octave_idx_type symmetric_init (const Matrix& a, const Matrix& b, bool calc_eigenvectors);
00102 octave_idx_type hermitian_init (const ComplexMatrix& a, bool calc_eigenvectors);
00103 octave_idx_type hermitian_init (const ComplexMatrix& a, const ComplexMatrix& b, bool calc_eigenvectors);
00104 };
00105
00106 #endif
00107
00108
00109
00110
00111
00112