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

#include <SparseRegularInverse.h>

Public Member Functions

Index cols () const
 
void mat_prod (const Scalar *x_in, Scalar *y_out) const
 
Index rows () const
 
void solve (const Scalar *x_in, Scalar *y_out) const
 
 SparseRegularInverse (ConstGenericSparseMatrix &mat)
 

Private Types

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

const typedef Eigen::Ref< const SparseMatrixConstGenericSparseMatrix
 
Eigen::ConjugateGradient< SparseMatrixm_cg
 
ConstGenericSparseMatrix m_mat
 
const int m_n
 

Detailed Description

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

This class defines matrix operations required by the generalized eigen solver in the regular inverse mode. For a sparse and positive definite matrix $B$, it implements the matrix-vector product $y=Bx$ and the linear equation solving operation $y=B^{-1}x$.

This class is intended to be used with the SymGEigsSolver generalized eigen solver in the regular inverse mode.

Definition at line 29 of file SparseRegularInverse.h.

Member Typedef Documentation

◆ Index

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

Definition at line 32 of file SparseRegularInverse.h.

◆ MapConstVec

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

Definition at line 34 of file SparseRegularInverse.h.

◆ MapVec

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

Definition at line 35 of file SparseRegularInverse.h.

◆ SparseMatrix

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

Definition at line 36 of file SparseRegularInverse.h.

◆ Vector

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

Definition at line 33 of file SparseRegularInverse.h.

Constructor & Destructor Documentation

◆ SparseRegularInverse()

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
Spectra::SparseRegularInverse< Scalar, Uplo, Flags, StorageIndex >::SparseRegularInverse ( 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 51 of file SparseRegularInverse.h.

Member Function Documentation

◆ cols()

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

Return the number of columns of the underlying matrix.

Definition at line 67 of file SparseRegularInverse.h.

◆ mat_prod()

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

Perform the matrix-vector multiplication operation $y=Bx$.

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

Definition at line 90 of file SparseRegularInverse.h.

◆ rows()

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

Return the number of rows of the underlying matrix.

Definition at line 63 of file SparseRegularInverse.h.

◆ solve()

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

Perform the solving operation $y=B^{-1}x$.

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

Definition at line 76 of file SparseRegularInverse.h.

Member Data Documentation

◆ ConstGenericSparseMatrix

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

Definition at line 37 of file SparseRegularInverse.h.

◆ m_cg

template<typename Scalar , int Uplo = Eigen::Lower, int Flags = 0, typename StorageIndex = int>
Eigen::ConjugateGradient<SparseMatrix> Spectra::SparseRegularInverse< Scalar, Uplo, Flags, StorageIndex >::m_cg
private

Definition at line 41 of file SparseRegularInverse.h.

◆ m_mat

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

Definition at line 39 of file SparseRegularInverse.h.

◆ m_n

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

Definition at line 40 of file SparseRegularInverse.h.


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


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:25:06