ARPACK-Armadillo
TridiagEigen< Scalar > Class Template Reference

#include <TridiagEigen.h>

Public Member Functions

 TridiagEigen ()
 
 TridiagEigen (const Matrix &mat)
 
void compute (const Matrix &mat)
 
Vector eigenvalues ()
 
Matrix eigenvectors ()
 

Detailed Description

template<typename Scalar = double>
class TridiagEigen< Scalar >

Calculate the eigenvalues and eigenvectors of a symmetric tridiagonal matrix.

Template Parameters
ScalarThe element type of the matrix. Currently supported types are float and double.

This class is a wrapper of the Lapack functions _steqr.

Definition at line 25 of file TridiagEigen.h.

Constructor & Destructor Documentation

template<typename Scalar = double>
TridiagEigen< Scalar >::TridiagEigen ( )
inline

Default constructor. Computation can be performed later by calling the compute() method.

Definition at line 43 of file TridiagEigen.h.

template<typename Scalar = double>
TridiagEigen< Scalar >::TridiagEigen ( const Matrix &  mat)
inline

Constructor to create an object that calculates the eigenvalues and eigenvectors of a symmetric tridiagonal matrix mat.

Parameters
matMatrix type can be arma::mat or arma::fmat, depending on the template parameter Scalar defined. Only the main diagonal and the lower sub-diagonal parts of the matrix are used.

Definition at line 56 of file TridiagEigen.h.

Member Function Documentation

template<typename Scalar = double>
void TridiagEigen< Scalar >::compute ( const Matrix &  mat)
inline

Compute the eigenvalue decomposition of a symmetric tridiagonal matrix.

Parameters
matMatrix type can be arma::mat or arma::fmat, depending on the template parameter Scalar defined. Only the main diagonal and the lower sub-diagonal parts of the matrix are used.

Definition at line 70 of file TridiagEigen.h.

template<typename Scalar = double>
Vector TridiagEigen< Scalar >::eigenvalues ( )
inline

Retrieve the eigenvalues.

Returns
Returned vector type will be arma::vec or arma::fvec, depending on the template parameter Scalar defined.

Definition at line 123 of file TridiagEigen.h.

template<typename Scalar = double>
Matrix TridiagEigen< Scalar >::eigenvectors ( )
inline

Retrieve the eigenvectors.

Returns
Returned matrix type will be arma::mat or arma::fmat, depending on the template parameter Scalar defined.

Definition at line 138 of file TridiagEigen.h.


The documentation for this class was generated from the following file: