$search
#include <rtcEigenSystem.h>
Public Member Functions | |
void | balance () |
void | eigenSort (Vec< T, M > &d, SMat< T, M > &v) |
EigenSystem (SMat< T, M > &a_) | |
void | hessenbergReduce () |
void | householderReduce (Vec< T, M > &d, Vec< T, M > &e, bool vecs=true) |
void | householderSolve (Vec< T, M > &d, Vec< T, M > &e, bool vecs=true) |
bool | jacobi (Vec< T, M > &eigenvalues, SMat< T, M > &eigenvectors) |
bool | jacobi (Vec< T, M > &eigenvalues, SMat< T, M > &eigenvectors, int *nrot) |
bool | jacobi2 (Vec< T, M > &eigenvalues, SMat< T, M > &eigenvectors) const |
void | qr (Vec< T, M > &wreal, Vec< T, M > &wimag) |
~EigenSystem () | |
Protected Member Functions | |
void | rotate (double &g, double &h, SMat< T, M > &a, const int i, const int j, const int k, const int l, const double s, const double tau) const |
void | rotateT (double &g, double &h, SMat< T, M > &a, const int i, const int j, const int k, const int l, const double s, const double tau) const |
Protected Attributes | |
SMat< T, M > & | a |
Eigen Value/Vector System, a composition of SMat<T,M> and Vec<T,M>
All methods have been vetted against each other but not compared to external references like Matlab. Also, there has been no test of challenging matrices, only random, well-conditioned ones. Since these methods have all been taken from Numerical Recipes for C (online), they should all function well. However, I've parsed all but the QR algorithm into 0-based index referencing (I put a wrapper on QR because the internal indexing was too complicated), so there is a possibility that some mistakes were made in this transcription (unlikely, however, since they appear to work.
Definition at line 60 of file rtcEigenSystem.h.
rtc::EigenSystem< T, M >::EigenSystem | ( | SMat< T, M > & | a_ | ) | [inline] |
Ctor that accepts system matrix.
Definition at line 106 of file rtcEigenSystem.h.
rtc::EigenSystem< T, M >::~EigenSystem | ( | ) | [inline] |
Dtor to delete memory and indicate conclusion
Definition at line 112 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::balance | ( | ) | [inline] |
Balance an unbalanced non-symmetric real-valued matrix. Taken from Numerical Recipes in C.
Definition at line 543 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::eigenSort | ( | Vec< T, M > & | d, | |
SMat< T, M > & | v | |||
) | [inline] |
Sorts eigenvalues (and corresponding eigenvectors) into descending order by straight insertion. Taken from Numerical Recipes in C.
Definition at line 518 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::hessenbergReduce | ( | ) | [inline] |
Reduce to Hessenberg form, for real non-symmetric matrices. Best to run EigenSystem<T,M>::balance() first, though not required. Taken from Numerical Recipes in C.
Definition at line 585 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::householderReduce | ( | Vec< T, M > & | d, | |
Vec< T, M > & | e, | |||
bool | vecs = true | |||
) | [inline] |
Householder reduction of real, symmetric matrices. Taken from Numerical Recipes in C.
Definition at line 354 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::householderSolve | ( | Vec< T, M > & | d, | |
Vec< T, M > & | e, | |||
bool | vecs = true | |||
) | [inline] |
Householder Eigenvector Solve of real, symmetric matrices. Taken from Numerical Recipes in C.
d | is the diagonal from householderReduce() | |
e | is the off-diagonal from householderReduce() | |
vecs | should be set if eigenvectors are wanted |
Definition at line 444 of file rtcEigenSystem.h.
bool rtc::EigenSystem< T, M >::jacobi | ( | Vec< T, M > & | d, | |
SMat< T, M > & | v | |||
) | [inline] |
Jacobi method for real symmetric matrices. Taken from Numerical Recipes in C.
Definition at line 123 of file rtcEigenSystem.h.
bool rtc::EigenSystem< T, M >::jacobi | ( | Vec< T, M > & | d, | |
SMat< T, M > & | v, | |||
int * | nrot | |||
) | [inline] |
Jacobi method for real symmetric matrices. Taken from Numerical Recipes in C.
Definition at line 135 of file rtcEigenSystem.h.
bool rtc::EigenSystem< T, M >::jacobi2 | ( | Vec< T, M > & | eigenvalues, | |
SMat< T, M > & | eigenvectors | |||
) | const [inline] |
Jacobi method for real symmetric matrices. Taken from Numerical Recipes in C. Press, Vetterling, Teukolsky, Flannery Numerical Recipes in C, 2nd edition Cambridge University Press, 1992 p. 467
Definition at line 239 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::qr | ( | Vec< T, M > & | wreal, | |
Vec< T, M > & | wimag | |||
) | [inline] |
Perform a QR Decomposition, for real non-symmetric matrices. Precondition: works on output of hessenbergReduce(). Taken from Numerical Recipes in C.
Definition at line 620 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::rotate | ( | double & | g, | |
double & | h, | |||
SMat< T, M > & | a, | |||
const int | i, | |||
const int | j, | |||
const int | k, | |||
const int | l, | |||
const double | s, | |||
const double | tau | |||
) | const [inline, protected] |
Definition at line 208 of file rtcEigenSystem.h.
void rtc::EigenSystem< T, M >::rotateT | ( | double & | g, | |
double & | h, | |||
SMat< T, M > & | a, | |||
const int | i, | |||
const int | j, | |||
const int | k, | |||
const int | l, | |||
const double | s, | |||
const double | tau | |||
) | const [inline, protected] |
Definition at line 218 of file rtcEigenSystem.h.
SMat<T,M>& rtc::EigenSystem< T, M >::a [protected] |
Definition at line 92 of file rtcEigenSystem.h.