#include <GenEigsSolver.h>
Public Member Functions | |
GenEigsSolver (OpType *op, Index nev, Index ncv) | |
Public Member Functions inherited from Spectra::GenEigsBase< Scalar, SelectionRule, OpType, IdentityBOp > | |
Index | compute (Index maxit=1000, Scalar tol=1e-10, int sort_rule=LARGEST_MAGN) |
ComplexVector | eigenvalues () const |
ComplexMatrix | eigenvectors (Index nvec) const |
ComplexMatrix | eigenvectors () const |
int | info () const |
void | init (const Scalar *init_resid) |
void | init () |
Index | num_iterations () const |
Index | num_operations () const |
Private Types | |
typedef Eigen::Index | Index |
Additional Inherited Members | |
Protected Member Functions inherited from Spectra::GenEigsBase< Scalar, SelectionRule, OpType, IdentityBOp > | |
virtual void | sort_ritzpair (int sort_rule) |
Protected Attributes inherited from Spectra::GenEigsBase< Scalar, SelectionRule, OpType, IdentityBOp > | |
ArnoldiFac | m_fac |
const Index | m_n |
const Index | m_ncv |
const Index | m_nev |
Index | m_niter |
Index | m_nmatop |
OpType * | m_op |
ComplexVector | m_ritz_est |
ComplexVector | m_ritz_val |
ComplexMatrix | m_ritz_vec |
This class implements the eigen solver for general real matrices, i.e., to solve for a possibly non-symmetric matrix.
Most of the background information documented in the SymEigsSolver class also applies to the GenEigsSolver class here, except that the eigenvalues and eigenvectors of a general matrix can now be complex-valued.
Scalar | The element type of the matrix. Currently supported types are float , double and long double . |
SelectionRule | An enumeration value indicating the selection rule of the requested eigenvalues, for example LARGEST_MAGN to retrieve eigenvalues with the largest magnitude. The full list of enumeration values can be found in Enumerations. |
OpType | The name of the matrix operation class. Users could either use the wrapper classes such as DenseGenMatProd and SparseGenMatProd, or define their own that implements all the public member functions as in DenseGenMatProd. |
An example that illustrates the usage of GenEigsSolver is give below:
And also an example for sparse matrices:
Definition at line 128 of file GenEigsSolver.h.
|
private |
Definition at line 131 of file GenEigsSolver.h.
|
inline |
Constructor to create a solver object.
op | Pointer to the matrix operation object, which should implement the matrix-vector multiplication operation of : calculating for any vector . Users could either create the object from the wrapper class such as DenseGenMatProd, or define their own that implements all the public member functions as in DenseGenMatProd. |
nev | Number of eigenvalues requested. This should satisfy , where 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 , and is advised to take . |
Definition at line 151 of file GenEigsSolver.h.