Public Member Functions | Private Types | Private Attributes | List of all members
Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex > Class Template Reference

#include <SparseSymShiftSolve.h>

Public Member Functions

Index cols () const
 
void perform_op (const Scalar *x_in, Scalar *y_out) const
 
Index rows () const
 
void set_shift (Scalar sigma)
 
 SparseSymShiftSolve (ConstGenericSparseMatrix &mat)
 

Private Types

typedef const Eigen::Ref< const SparseMatrixConstGenericSparseMatrix
 
typedef Eigen::Index Index
 
typedef Eigen::Map< const VectorMapConstVec
 
typedef Eigen::Map< VectorMapVec
 
typedef Eigen::SparseMatrix< Scalar, Flags, StorageIndex > SparseMatrix
 
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
 

Private Attributes

ConstGenericSparseMatrix m_mat
 
const int m_n
 
Eigen::SparseLU< SparseMatrixm_solver
 

Detailed Description

template<typename Scalar, int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
class Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >

This class defines the shift-solve operation on a sparse real symmetric matrix $A$, i.e., calculating $y=(A-\sigma I)^{-1}x$ for any real $\sigma$ and vector $x$. It is mainly used in the SymEigsShiftSolver eigen solver.

Definition at line 25 of file SparseSymShiftSolve.h.

Member Typedef Documentation

◆ ConstGenericSparseMatrix

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
typedef const Eigen::Ref<const SparseMatrix> Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::ConstGenericSparseMatrix
private

Definition at line 33 of file SparseSymShiftSolve.h.

◆ Index

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
typedef Eigen::Index Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::Index
private

Definition at line 28 of file SparseSymShiftSolve.h.

◆ MapConstVec

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
typedef Eigen::Map<const Vector> Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::MapConstVec
private

Definition at line 30 of file SparseSymShiftSolve.h.

◆ MapVec

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
typedef Eigen::Map<Vector> Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::MapVec
private

Definition at line 31 of file SparseSymShiftSolve.h.

◆ SparseMatrix

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
typedef Eigen::SparseMatrix<Scalar, Flags, StorageIndex> Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::SparseMatrix
private

Definition at line 32 of file SparseSymShiftSolve.h.

◆ Vector

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1> Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::Vector
private

Definition at line 29 of file SparseSymShiftSolve.h.

Constructor & Destructor Documentation

◆ SparseSymShiftSolve()

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::SparseSymShiftSolve ( ConstGenericSparseMatrix mat)
inline

Constructor to create the matrix operation object.

Parameters
matAn Eigen sparse matrix object, whose type can be Eigen::SparseMatrix<Scalar, ...> or its mapped version Eigen::Map<Eigen::SparseMatrix<Scalar, ...> >.

Definition at line 47 of file SparseSymShiftSolve.h.

Member Function Documentation

◆ cols()

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
Index Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::cols ( void  ) const
inline

Return the number of columns of the underlying matrix.

Definition at line 61 of file SparseSymShiftSolve.h.

◆ perform_op()

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
void Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::perform_op ( const Scalar x_in,
Scalar y_out 
) const
inline

Perform the shift-solve operation $y=(A-\sigma I)^{-1}x$.

Parameters
x_inPointer to the $x$ vector.
y_outPointer to the $y$ vector.

Definition at line 85 of file SparseSymShiftSolve.h.

◆ rows()

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
Index Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::rows ( void  ) const
inline

Return the number of rows of the underlying matrix.

Definition at line 57 of file SparseSymShiftSolve.h.

◆ set_shift()

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
void Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::set_shift ( Scalar  sigma)
inline

Set the real shift $\sigma$.

Definition at line 66 of file SparseSymShiftSolve.h.

Member Data Documentation

◆ m_mat

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
ConstGenericSparseMatrix Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::m_mat
private

Definition at line 35 of file SparseSymShiftSolve.h.

◆ m_n

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
const int Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::m_n
private

Definition at line 36 of file SparseSymShiftSolve.h.

◆ m_solver

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
Eigen::SparseLU<SparseMatrix> Spectra::SparseSymShiftSolve< Scalar, Uplo, Flags, StorageIndex >::m_solver
private

Definition at line 37 of file SparseSymShiftSolve.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:31