Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Spectra::GenEigsComplexShiftSolver< OpType > Class Template Reference

#include <GenEigsComplexShiftSolver.h>

Inheritance diagram for Spectra::GenEigsComplexShiftSolver< OpType >:
Inheritance graph
[legend]

Public Member Functions

 GenEigsComplexShiftSolver (OpType &op, Index nev, Index ncv, const Scalar &sigmar, const Scalar &sigmai)
 
- Public Member Functions inherited from Spectra::GenEigsBase< DenseGenComplexShiftSolve< double >, IdentityBOp >
Index compute (SortRule selection=SortRule::LargestMagn, Index maxit=1000, Scalar tol=1e-10, SortRule sorting=SortRule::LargestMagn)
 
ComplexVector eigenvalues () const
 
ComplexMatrix eigenvectors () const
 
ComplexMatrix eigenvectors (Index nvec) const
 
CompInfo info () const
 
void init ()
 
void init (const Scalar *init_resid)
 
Index num_iterations () const
 
Index num_operations () const
 

Private Types

using Base = GenEigsBase< OpType, IdentityBOp >
 
using Complex = std::complex< Scalar >
 
using ComplexArray = Eigen::Array< Complex, Eigen::Dynamic, 1 >
 
using Index = Eigen::Index
 
using Scalar = typename OpType::Scalar
 
using Vector = Eigen::Matrix< Scalar, Eigen::Dynamic, 1 >
 

Private Member Functions

void sort_ritzpair (SortRule sort_rule) override
 

Private Attributes

ArnoldiFac m_fac
 
const Index m_n
 
const Index m_nev
 
OpType & m_op
 
ComplexVector m_ritz_val
 
ComplexMatrix m_ritz_vec
 
const Scalar m_sigmai
 
const Scalar m_sigmar
 

Additional Inherited Members

- Protected Attributes inherited from Spectra::GenEigsBase< DenseGenComplexShiftSolve< double >, IdentityBOp >
ArnoldiFac m_fac
 
const Index m_n
 
const Index m_ncv
 
const Index m_nev
 
Index m_niter
 
Index m_nmatop
 
DenseGenComplexShiftSolve< double > & m_op
 
ComplexVector m_ritz_est
 
ComplexVector m_ritz_val
 
ComplexMatrix m_ritz_vec
 

Detailed Description

template<typename OpType = DenseGenComplexShiftSolve<double>>
class Spectra::GenEigsComplexShiftSolver< OpType >

This class implements the eigen solver for general real matrices with a complex shift value in the shift-and-invert mode. The background knowledge of the shift-and-invert mode can be found in the documentation of the SymEigsShiftSolver class.

Template Parameters
OpTypeThe name of the matrix operation class. Users could either use the wrapper classes such as DenseGenComplexShiftSolve and SparseGenComplexShiftSolve, or define their own that implements the type definition Scalar and all the public member functions as in DenseGenComplexShiftSolve.

Definition at line 33 of file GenEigsComplexShiftSolver.h.

Member Typedef Documentation

◆ Base

template<typename OpType = DenseGenComplexShiftSolve<double>>
using Spectra::GenEigsComplexShiftSolver< OpType >::Base = GenEigsBase<OpType, IdentityBOp>
private

Definition at line 42 of file GenEigsComplexShiftSolver.h.

◆ Complex

template<typename OpType = DenseGenComplexShiftSolve<double>>
using Spectra::GenEigsComplexShiftSolver< OpType >::Complex = std::complex<Scalar>
private

Definition at line 38 of file GenEigsComplexShiftSolver.h.

◆ ComplexArray

template<typename OpType = DenseGenComplexShiftSolve<double>>
using Spectra::GenEigsComplexShiftSolver< OpType >::ComplexArray = Eigen::Array<Complex, Eigen::Dynamic, 1>
private

Definition at line 40 of file GenEigsComplexShiftSolver.h.

◆ Index

template<typename OpType = DenseGenComplexShiftSolve<double>>
using Spectra::GenEigsComplexShiftSolver< OpType >::Index = Eigen::Index
private

Definition at line 37 of file GenEigsComplexShiftSolver.h.

◆ Scalar

template<typename OpType = DenseGenComplexShiftSolve<double>>
using Spectra::GenEigsComplexShiftSolver< OpType >::Scalar = typename OpType::Scalar
private

Definition at line 36 of file GenEigsComplexShiftSolver.h.

◆ Vector

template<typename OpType = DenseGenComplexShiftSolve<double>>
using Spectra::GenEigsComplexShiftSolver< OpType >::Vector = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>
private

Definition at line 39 of file GenEigsComplexShiftSolver.h.

Constructor & Destructor Documentation

◆ GenEigsComplexShiftSolver()

template<typename OpType = DenseGenComplexShiftSolve<double>>
Spectra::GenEigsComplexShiftSolver< OpType >::GenEigsComplexShiftSolver ( OpType &  op,
Index  nev,
Index  ncv,
const Scalar sigmar,
const Scalar sigmai 
)
inline

Constructor to create a eigen solver object using the shift-and-invert mode.

Parameters
opThe matrix operation object that implements the complex shift-solve operation of $A$: calculating $\mathrm{Re}\{(A-\sigma I)^{-1}v\}$ for any vector $v$. Users could either create the object from the wrapper class such as DenseGenComplexShiftSolve, or define their own that implements all the public members as in DenseGenComplexShiftSolve.
nevNumber of eigenvalues requested. This should satisfy $1\le nev \le n-2$, where $n$ is the size of matrix.
ncvParameter 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+2 \le ncv \le n$, and is advised to take $ncv \ge 2\cdot nev + 1$.
sigmarThe real part of the shift.
sigmaiThe imaginary part of the shift.

Definition at line 149 of file GenEigsComplexShiftSolver.h.

Member Function Documentation

◆ sort_ritzpair()

template<typename OpType = DenseGenComplexShiftSolve<double>>
void Spectra::GenEigsComplexShiftSolver< OpType >::sort_ritzpair ( SortRule  sort_rule)
inlineoverrideprivatevirtual

Member Data Documentation

◆ m_fac

template<typename OpType = DenseGenComplexShiftSolve<double>>
ArnoldiFac Spectra::GenEigsBase< OpType, BOpType >::m_fac
private

Definition at line 68 of file GenEigsBase.h.

◆ m_n

template<typename OpType = DenseGenComplexShiftSolve<double>>
const Index Spectra::GenEigsBase< OpType, BOpType >::m_n
private

Definition at line 62 of file GenEigsBase.h.

◆ m_nev

template<typename OpType = DenseGenComplexShiftSolve<double>>
const Index Spectra::GenEigsBase< OpType, BOpType >::m_nev
private

Definition at line 63 of file GenEigsBase.h.

◆ m_op

template<typename OpType = DenseGenComplexShiftSolve<double>>
OpType& Spectra::GenEigsBase< OpType, BOpType >::m_op
private

Definition at line 60 of file GenEigsBase.h.

◆ m_ritz_val

template<typename OpType = DenseGenComplexShiftSolve<double>>
ComplexVector Spectra::GenEigsBase< OpType, BOpType >::m_ritz_val
private

Definition at line 70 of file GenEigsBase.h.

◆ m_ritz_vec

template<typename OpType = DenseGenComplexShiftSolve<double>>
ComplexMatrix Spectra::GenEigsBase< OpType, BOpType >::m_ritz_vec
private

Definition at line 71 of file GenEigsBase.h.

◆ m_sigmai

template<typename OpType = DenseGenComplexShiftSolve<double>>
const Scalar Spectra::GenEigsComplexShiftSolver< OpType >::m_sigmai
private

Definition at line 51 of file GenEigsComplexShiftSolver.h.

◆ m_sigmar

template<typename OpType = DenseGenComplexShiftSolve<double>>
const Scalar Spectra::GenEigsComplexShiftSolver< OpType >::m_sigmar
private

Definition at line 50 of file GenEigsComplexShiftSolver.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Wed May 28 2025 03:15:49