Easy3D 2.6.1
|
An easy-to-use eigen solver. More...
#include <easy3d/core/eigen_solver.h>
Public Types | |
enum | SortingMethod { NO_SORTING , INCREASING , DECREASING } |
Enumeration of sorting methods for eigenvalues and their corresponding eigenvectors. More... | |
Public Member Functions | |
EigenSolver (int n) | |
Constructs an EigenSolver with a specified matrix size. | |
~EigenSolver () | |
Destructor. | |
void | solve (const MAT &mat, SortingMethod sm=NO_SORTING) |
Computes the eigenvalues and eigenvectors of the specified input matrix. | |
T | eigen_value (int i) const |
Retrieves the eigenvalue at the specified index. | |
T | eigen_vector (int comp, int i) const |
Retrieves the specified component of the eigenvector at the given index. | |
T * | eigen_values () |
Retrieves the array of eigenvalues. | |
const MAT & | eigen_vectors () |
Retrieves the matrix of eigenvectors, stored as columns. | |
An easy-to-use eigen solver.
This class provides methods to compute the eigenvalues and eigenvectors of a given matrix.
MAT | The type of the matrix. |
T | The type of the floating-point number (default is double). |
enum SortingMethod |
|
explicit |
Constructs an EigenSolver with a specified matrix size.
n | The size of the input matrix. |
|
inline |
Retrieves the eigenvalue at the specified index.
i | The index of the eigenvalue. |
|
inline |
Retrieves the array of eigenvalues.
|
inline |
Retrieves the specified component of the eigenvector at the given index.
comp | The component index of the eigenvector. |
i | The index of the eigenvector. |
|
inline |
Retrieves the matrix of eigenvectors, stored as columns.
void solve | ( | const MAT & | mat, |
SortingMethod | sm = NO_SORTING ) |
Computes the eigenvalues and eigenvectors of the specified input matrix.
mat | The input matrix. |
sm | The sorting method for the eigenvalues and eigenvectors (default is NO_SORTING). |