Spectra
Spectra::SparseGenRealShiftSolve< Scalar, Flags, StorageIndex > Class Template Reference

#include <SparseGenRealShiftSolve.h>

Public Member Functions

 SparseGenRealShiftSolve (const SparseMatrix &mat_)
 
int rows () const
 
int cols () const
 
void set_shift (Scalar sigma)
 
void perform_op (const Scalar *x_in, Scalar *y_out) const
 

Detailed Description

template<typename Scalar, int Flags = 0, typename StorageIndex = int>
class Spectra::SparseGenRealShiftSolve< Scalar, Flags, StorageIndex >

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

Definition at line 26 of file SparseGenRealShiftSolve.h.

Constructor & Destructor Documentation

◆ SparseGenRealShiftSolve()

template<typename Scalar , int Flags = 0, typename StorageIndex = int>
Spectra::SparseGenRealShiftSolve< Scalar, Flags, StorageIndex >::SparseGenRealShiftSolve ( const SparseMatrix &  mat_)
inline

Constructor to create the matrix operation object.

Parameters
mat_An Eigen sparse matrix object, whose type is Eigen::SparseMatrix<Scalar, ...>.

Definition at line 45 of file SparseGenRealShiftSolve.h.

Member Function Documentation

◆ rows()

template<typename Scalar , int Flags = 0, typename StorageIndex = int>
int Spectra::SparseGenRealShiftSolve< Scalar, Flags, StorageIndex >::rows ( ) const
inline

Return the number of rows of the underlying matrix.

Definition at line 56 of file SparseGenRealShiftSolve.h.

◆ cols()

template<typename Scalar , int Flags = 0, typename StorageIndex = int>
int Spectra::SparseGenRealShiftSolve< Scalar, Flags, StorageIndex >::cols ( ) const
inline

Return the number of columns of the underlying matrix.

Definition at line 60 of file SparseGenRealShiftSolve.h.

◆ set_shift()

template<typename Scalar , int Flags = 0, typename StorageIndex = int>
void Spectra::SparseGenRealShiftSolve< Scalar, Flags, StorageIndex >::set_shift ( Scalar  sigma)
inline

Set the real shift \(\sigma\).

Definition at line 65 of file SparseGenRealShiftSolve.h.

◆ perform_op()

template<typename Scalar , int Flags = 0, typename StorageIndex = int>
void Spectra::SparseGenRealShiftSolve< Scalar, 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 80 of file SparseGenRealShiftSolve.h.


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