Spectra 1.1.0
Header-only C++ Library for Large Scale Eigenvalue Problems
|
#include <Spectra/HermEigsBase.h>
Public Member Functions | |
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 is the base class for Hermitian (and real symmetric) eigen solvers, mainly for internal use. It is kept here to provide the documentation for member functions of concrete eigen solvers such as SymEigsSolver, HermEigsSolver, SymEigsShiftSolver, etc.
Definition at line 44 of file HermEigsBase.h.
|
inline |
Initializes the solver by providing an initial residual vector.
init_resid | Pointer to the initial residual vector. |
Spectra (and also ARPACK) uses an iterative algorithm to find eigenvalues. This function allows the user to provide the initial residual vector.
Definition at line 303 of file HermEigsBase.h.
|
inline |
Initializes the solver by providing a random initial residual vector.
This overloaded function generates a random initial residual vector (with a fixed random seed) for the algorithm. Elements in the vector follow independent Uniform(-0.5, 0.5) distribution.
Definition at line 331 of file HermEigsBase.h.
|
inline |
Conducts the major computation procedure.
selection | An enumeration value indicating the selection rule of the requested eigenvalues, for example SortRule::LargestMagn to retrieve eigenvalues with the largest magnitude. The full list of enumeration values can be found in Enumerations. |
maxit | Maximum number of iterations allowed in the algorithm. |
tol | Precision parameter for the calculated eigenvalues. |
sorting | Rule to sort the eigenvalues and eigenvectors. Supported values are SortRule::LargestAlge , SortRule::LargestMagn , SortRule::SmallestAlge , and SortRule::SmallestMagn . For example, SortRule::LargestAlge indicates that largest eigenvalues come first. Note that this argument is only used to sort the final result, and the selection rule (e.g. selecting the largest or smallest eigenvalues in the full spectrum) is specified by the parameter selection . |
Definition at line 360 of file HermEigsBase.h.
|
inline |
Returns the status of the computation. The full list of enumeration values can be found in Enumerations.
Definition at line 390 of file HermEigsBase.h.
|
inline |
Returns the number of iterations used in the computation.
Definition at line 395 of file HermEigsBase.h.
|
inline |
Returns the number of matrix operations used in the computation.
Definition at line 400 of file HermEigsBase.h.
|
inline |
Returns the converged eigenvalues.
Eigen::Vector<RealScalar, ...>
, depending on the Scalar
type defined in the matrix operation class. For example, if Scalar
is double
or std::complex<double>
, then RealScalar
would be double
. Definition at line 411 of file HermEigsBase.h.
|
inlinevirtual |
Returns the eigenvectors associated with the converged eigenvalues.
nvec | The number of eigenvectors to return. |
Eigen::Matrix<Scalar, ...>
, depending on the Scalar
type defined in the matrix operation class. Definition at line 441 of file HermEigsBase.h.
|
inlinevirtual |
Returns all converged eigenvectors.
Definition at line 469 of file HermEigsBase.h.