#include <itkSymmetricEigenAnalysis.h>
The class is templated over the input matrix, (which is expected to provide access to its elements with the [][] operator), matrix to store eigen values, (must provide write operations on its elements with the [] operator), EigenMatrix to store eigen vectors (must provide write access to its elements with the [][] operator).
The SetOrderEigenValues() method can be used to order eigen values (and their corresponding eigen vectors if computed) in ascending order. This is the default ordering scheme. Eigen vectors and values can be obtained without ordering by calling SetOrderEigenValues(false)
The SetOrderEigenMagnitudes() method can be used to order eigen values (and their corresponding eigen vectors if computed) by magnitude in ascending order.
The user of this class is explicitly supposed to set the dimension of the 2D matrix using the SetDimension() method.
The class contains routines taken from netlib sources. (www.netlib.org). netlib/tql1.c netlib/tql2.c netlib/tred1.c netlib/tred2.c
Reference: num. math. 11, 293-306(1968) by bowdler, martin, reinsch, and wilkinson. handbook for auto. comp., vol.ii-linear algebra, 227-240(1971).
Definition at line 60 of file itkSymmetricEigenAnalysis.h.
Public Types | |
typedef TEigenMatrix | EigenMatrixType |
enum | EigenValueOrderType { OrderByValue = 1, OrderByMagnitude, DoNotOrder } |
typedef TMatrix | MatrixType |
typedef TVector | VectorType |
Public Member Functions | |
unsigned int | ComputeEigenValues (const TMatrix &A, TVector &EigenValues) const |
unsigned int | ComputeEigenValuesAndVectors (const TMatrix &A, TVector &EigenValues, TEigenMatrix &EigenVectors) const |
unsigned int | GetDimension () const |
unsigned int | GetOrder () const |
void | SetOrder (const unsigned int n) |
SymmetricEigenAnalysis (const unsigned int dimension) | |
SymmetricEigenAnalysis () | |
~SymmetricEigenAnalysis () | |
bool | GetOrderEigenMagnitudes () const |
void | SetOrderEigenMagnitudes (const bool b) |
bool | GetOrderEigenValues () const |
void | SetOrderEigenValues (const bool b) |
void | SetDimension (const unsigned int n) |
typedef TEigenMatrix itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::EigenMatrixType |
Definition at line 84 of file itkSymmetricEigenAnalysis.h.
typedef TMatrix itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::MatrixType |
Definition at line 81 of file itkSymmetricEigenAnalysis.h.
typedef TVector itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::VectorType |
Definition at line 85 of file itkSymmetricEigenAnalysis.h.
enum itk::SymmetricEigenAnalysis::EigenValueOrderType |
Definition at line 63 of file itkSymmetricEigenAnalysis.h.
itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SymmetricEigenAnalysis | ( | ) | [inline] |
Definition at line 69 of file itkSymmetricEigenAnalysis.h.
itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SymmetricEigenAnalysis | ( | const unsigned int | dimension | ) | [inline] |
Definition at line 75 of file itkSymmetricEigenAnalysis.h.
itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::~SymmetricEigenAnalysis | ( | ) | [inline] |
Definition at line 81 of file itkSymmetricEigenAnalysis.h.
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::ComputeEigenValues | ( | const TMatrix & | A, | |
TVector & | EigenValues | |||
) | const |
Compute Eigen values of A A is any type that overloads the [][] operator and contains the symmetric matrix. In practice only the upper triangle of the matrix will be accessed. (Both itk::Matrix and vnl_matrix overload [][] operator.)
'EigenValues' is any type that overloads the [] operator and will contain the eigen values.
No size checking is performed. A is expected to be a square matrix of size m_Dimension. 'EigenValues' is expected to be of length m_Dimension. The matrix is not checked to see if it is symmetric.
Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInput, TOutput >::operator()().
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::ComputeEigenValuesAndVectors | ( | const TMatrix & | A, | |
TVector & | EigenValues, | |||
TEigenMatrix & | EigenVectors | |||
) | const |
Compute Eigen values and vectors of A A is any type that overloads the [][] operator and contains the symmetric matrix. In practice only the upper triangle of the matrix will be accessed. (Both itk::Matrix and vnl_matrix overload [][] operator.)
'EigenValues' is any type that overloads the [] operator and will contain the eigen values.
'EigenVectors' is any type that provides access to its elements with the [][] operator. It is expected be of size m_Dimension * m_Dimension.
No size checking is performed. A is expected to be a square matrix of size m_Dimension. 'EigenValues' is expected to be of length m_Dimension. The matrix is not checked to see if it is symmetric.
Each row of the matrix 'EigenVectors' represents an eigen vector. (unlike MATLAB where the columns of the [EigenVectors, EigenValues] = eig(A) contains the eigenvectors).
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetDimension | ( | void | ) | const [inline] |
Get Matrix dimension, Will be 0 unless explicitly set by a call to SetDimension.
Definition at line 179 of file itkSymmetricEigenAnalysis.h.
Referenced by itk::operator<<().
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetOrder | ( | ) | const [inline] |
Get the Matrix order. Will be 0 unless explicitly set, or unless a call to SetDimension has been made in which case it will be the matrix dimension.
Definition at line 141 of file itkSymmetricEigenAnalysis.h.
Referenced by itk::operator<<().
bool itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetOrderEigenMagnitudes | ( | ) | const [inline] |
Definition at line 162 of file itkSymmetricEigenAnalysis.h.
References itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::OrderByMagnitude.
Referenced by itk::operator<<().
bool itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetOrderEigenValues | ( | ) | const [inline] |
Definition at line 151 of file itkSymmetricEigenAnalysis.h.
References itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::OrderByValue.
Referenced by itk::operator<<().
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetDimension | ( | const unsigned int | n | ) | [inline] |
Set the dimension of the input matrix A. A is a square matrix of size m_Dimension.
Definition at line 167 of file itkSymmetricEigenAnalysis.h.
Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInput, TOutput >::SetDimension().
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetOrder | ( | const unsigned int | n | ) | [inline] |
Matrix order. Defaults to matrix dimension if not set
Definition at line 133 of file itkSymmetricEigenAnalysis.h.
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetOrderEigenMagnitudes | ( | const bool | b | ) | [inline] |
Set/Get methods to order the eigen value magnitudes in ascending order. In other words, |lambda_1| < |lambda_2| < .....
Definition at line 157 of file itkSymmetricEigenAnalysis.h.
References itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::DoNotOrder, and itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::OrderByMagnitude.
Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInput, TOutput >::OrderEigenValuesBy().
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetOrderEigenValues | ( | const bool | b | ) | [inline] |
Set/Get methods to order the eigen values in ascending order. This is the default. ie lambda_1 < lambda_2 < ....
Definition at line 146 of file itkSymmetricEigenAnalysis.h.
References itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::DoNotOrder, and itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::OrderByValue.
Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInput, TOutput >::OrderEigenValuesBy().