Spectra 1.1.0
Header-only C++ Library for Large Scale Eigenvalue Problems
|
#include <Spectra/HermEigsSolver.h>
Public Member Functions | |
HermEigsSolver (OpType &op, Index nev, Index ncv) | |
![]() | |
void | init (const Scalar *init_resid) |
void | init () |
Index | compute (SortRule selection=SortRule::LargestMagn, Index maxit=1000, RealScalar tol=1e-10, SortRule sorting=SortRule::LargestAlge) |
CompInfo | info () const |
Index | num_iterations () const |
Index | num_operations () const |
RealVector | eigenvalues () const |
virtual Matrix | eigenvectors (Index nvec) const |
virtual Matrix | eigenvectors () const |
This class implements the eigen solver for Hermitian matrices, i.e., to solve Ax=\lambda x where A is Hermitian. An Hermitian matrix is a complex square matrix that is equal to its own conjugate transpose. It is known that all Hermitian matrices have real-valued eigenvalues.
OpType | The name of the matrix operation class. Users could either use the wrapper classes such as DenseHermMatProd and SparseHermMatProd, or define their own that implements the type definition Scalar and all the public member functions as in DenseHermMatProd. |
Below is an example that demonstrates the usage of this class.
And here is an example for user-supplied matrix operation class.
Definition at line 122 of file HermEigsSolver.h.
|
inline |
Constructor to create a solver object.
op | The matrix operation object that implements the matrix-vector multiplication operation of A: calculating Av for any vector v. Users could either create the object from the wrapper class such as DenseHermMatProd, or define their own that implements all the public members as in DenseHermMatProd. |
nev | Number of eigenvalues requested. This should satisfy 1\le nev \le n-1, where n is the size of matrix. |
ncv | Parameter that controls the convergence speed of the algorithm. Typically a larger ncv means faster convergence, but it may also result in greater memory use and more matrix operations in each iteration. This parameter must satisfy nev < ncv \le n, and is advised to take ncv \ge 2\cdot nev. |
Definition at line 145 of file HermEigsSolver.h.