latest version v1.9 - last update 10 Apr 2010 |
Computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. More...
#include <ltiFastGeneralizedEigenSystem.h>
Classes | |
class | parameters |
parameter class for fastGeneralizedEigenSystem More... | |
Public Member Functions | |
fastGeneralizedEigenSystem () | |
fastGeneralizedEigenSystem (const parameters &theParams) | |
fastGeneralizedEigenSystem (const int dimensions) | |
virtual | ~fastGeneralizedEigenSystem () |
const parameters & | getParameters () const |
virtual functor * | clone () const |
virtual bool | apply (const matrix< T > &a, const matrix< T > &b, vector< T > &eigenvalues, matrix< T > &eigenvectors) const |
virtual bool | apply (const matrix< T > &a, const matrix< T > &b, vector< T > &eigenvalues) const |
virtual const char * | getTypeName () const |
Computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric and B is also positive definite.
The type of problem as stated above can be selected via parameters::problemType. When all eigenvalues/eigenvectors are needed you can select the divide and conquer algorithm by setting parameters::useDC to true (_SYGVD instead of _SYGV). If only the n most significant eigenvalues/eigenvectors are needed set parameters::dimensions to n. The LAPACK routine _SYGVX is used.
Divide and conquer is usually faster especially for large matrices but also uses more workspace.
lti::fastGeneralizedEigenSystem< T >::fastGeneralizedEigenSystem | ( | ) |
default constructor
lti::fastGeneralizedEigenSystem< T >::fastGeneralizedEigenSystem | ( | const parameters & | theParams | ) |
constructor, sets the parameters
lti::fastGeneralizedEigenSystem< T >::fastGeneralizedEigenSystem | ( | const int | dimensions | ) |
constructor, sets the parameters
virtual lti::fastGeneralizedEigenSystem< T >::~fastGeneralizedEigenSystem | ( | ) | [virtual] |
destructor
virtual bool lti::fastGeneralizedEigenSystem< T >::apply | ( | const matrix< T > & | a, | |
const matrix< T > & | b, | |||
vector< T > & | eigenvalues | |||
) | const [virtual] |
Computes eigenvalues and eigenvectors of the given matrix.
The functor can efficiently calculate only a few dimensions of the eigenspace, taking those with the largest eigenvalues. The number of dimensions is set with parameters::dimensions.
a | the symmetric matrix A | |
b | the symmetric, positive definite matrix B | |
eigenvalues | elements will contain the eigenvalues |
Reimplemented from lti::generalizedEigenSystem< T >.
virtual bool lti::fastGeneralizedEigenSystem< T >::apply | ( | const matrix< T > & | a, | |
const matrix< T > & | b, | |||
vector< T > & | eigenvalues, | |||
matrix< T > & | eigenvectors | |||
) | const [virtual] |
Computes eigenvalues and eigenvectors of the given matrix.
The functor can efficiently calculate only a few dimensions of the eigenspace, taking those with the largest eigenvalues. The number of dimensions is set with parameters::dimensions.
a | the symmetric matrix A | |
b | the symmetric, positive definite matrix B | |
eigenvalues | elements will contain the eigenvalues | |
eigenvectors | columns will contain the eigenvectors corresponding to the eigenvalues |
Reimplemented from lti::generalizedEigenSystem< T >.
virtual functor* lti::fastGeneralizedEigenSystem< T >::clone | ( | ) | const [virtual] |
clone this functor
Reimplemented from lti::generalizedEigenSystem< T >.
const parameters& lti::fastGeneralizedEigenSystem< T >::getParameters | ( | ) | const |
returns the current parameters.
Reimplemented from lti::generalizedEigenSystem< T >.
virtual const char* lti::fastGeneralizedEigenSystem< T >::getTypeName | ( | void | ) | const [inline, virtual] |
returns the name of this type
Reimplemented from lti::generalizedEigenSystem< T >.