#include <HermEigsBase.h>
Public Member Functions | |
Index | compute (SortRule selection=SortRule::LargestMagn, Index maxit=1000, RealScalar tol=1e-10, SortRule sorting=SortRule::LargestAlge) |
RealVector | eigenvalues () const |
virtual Matrix | eigenvectors () const |
virtual Matrix | eigenvectors (Index nvec) const |
CompInfo | info () const |
void | init () |
void | init (const Scalar *init_resid) |
Index | num_iterations () const |
Index | num_operations () const |
Protected Member Functions | |
virtual void | sort_ritzpair (SortRule sort_rule) |
Protected Attributes | |
LanczosFac | m_fac |
const Index | m_n |
const Index | m_ncv |
const Index | m_nev |
Index | m_niter |
Index | m_nmatop |
const OpType & | m_op |
std::vector< OpType > | m_op_container |
RealVector | m_ritz_val |
Private Types | |
using | ArnoldiOpType = ArnoldiOp< Scalar, OpType, BOpType > |
using | BoolArray = Eigen::Array< bool, Eigen::Dynamic, 1 > |
using | Index = Eigen::Index |
using | LanczosFac = Lanczos< Scalar, ArnoldiOpType > |
using | MapConstVec = Eigen::Map< const Vector > |
using | MapMat = Eigen::Map< Matrix > |
using | MapVec = Eigen::Map< Vector > |
using | Matrix = Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > |
using | RealArray = Eigen::Array< RealScalar, Eigen::Dynamic, 1 > |
using | RealMatrix = Eigen::Matrix< RealScalar, Eigen::Dynamic, Eigen::Dynamic > |
using | RealScalar = typename Eigen::NumTraits< Scalar >::Real |
using | RealVector = Eigen::Matrix< RealScalar, Eigen::Dynamic, 1 > |
using | Scalar = typename OpType::Scalar |
using | Vector = Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > |
Private Member Functions | |
Index | nev_adjusted (Index nconv) |
Index | num_converged (const RealScalar &tol) |
void | restart (Index k, SortRule selection) |
void | retrieve_ritzpair (SortRule selection) |
Static Private Member Functions | |
static std::vector< OpType > | create_op_container (OpType &&rval) |
Private Attributes | |
CompInfo | m_info |
BoolArray | m_ritz_conv |
RealVector | m_ritz_est |
RealMatrix | m_ritz_vec |
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.
|
private |
Definition at line 63 of file HermEigsBase.h.
|
private |
Definition at line 58 of file HermEigsBase.h.
|
private |
Definition at line 52 of file HermEigsBase.h.
|
private |
Definition at line 64 of file HermEigsBase.h.
|
private |
Definition at line 61 of file HermEigsBase.h.
|
private |
Definition at line 59 of file HermEigsBase.h.
|
private |
Definition at line 60 of file HermEigsBase.h.
|
private |
Definition at line 53 of file HermEigsBase.h.
|
private |
Definition at line 57 of file HermEigsBase.h.
|
private |
Definition at line 55 of file HermEigsBase.h.
|
private |
Definition at line 51 of file HermEigsBase.h.
|
private |
Definition at line 56 of file HermEigsBase.h.
|
private |
Definition at line 47 of file HermEigsBase.h.
|
private |
Definition at line 54 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.
|
inlinestaticprivate |
Definition at line 94 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 all converged eigenvectors.
Definition at line 469 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.
|
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 |
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 |
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.
|
inlineprivate |
Definition at line 172 of file HermEigsBase.h.
|
inlineprivate |
Definition at line 152 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.
|
inlineprivate |
Definition at line 102 of file HermEigsBase.h.
|
inlineprivate |
Definition at line 199 of file HermEigsBase.h.
|
inlineprotectedvirtual |
Reimplemented in Spectra::SymGEigsShiftSolver< OpType, BOpType, GEigsMode::Cayley >, Spectra::SymGEigsShiftSolver< OpType, BOpType, GEigsMode::Buckling >, Spectra::SymGEigsShiftSolver< OpType, BOpType, GEigsMode::ShiftInvert >, and Spectra::SymEigsShiftSolver< OpType >.
Definition at line 223 of file HermEigsBase.h.
|
protected |
Definition at line 83 of file HermEigsBase.h.
|
private |
Definition at line 90 of file HermEigsBase.h.
|
protected |
Definition at line 77 of file HermEigsBase.h.
|
protected |
Definition at line 79 of file HermEigsBase.h.
|
protected |
Definition at line 78 of file HermEigsBase.h.
|
protected |
Definition at line 81 of file HermEigsBase.h.
|
protected |
Definition at line 80 of file HermEigsBase.h.
|
protected |
Definition at line 76 of file HermEigsBase.h.
|
protected |
Definition at line 75 of file HermEigsBase.h.
|
private |
Definition at line 89 of file HermEigsBase.h.
|
private |
Definition at line 88 of file HermEigsBase.h.
|
protected |
Definition at line 84 of file HermEigsBase.h.
|
private |
Definition at line 87 of file HermEigsBase.h.