Spectra
Spectra::DenseSymShiftSolve< Scalar, Uplo > Class Template Reference

#include <DenseSymShiftSolve.h>

Public Member Functions

 DenseSymShiftSolve (ConstGenericMatrix &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 Uplo = Eigen::Lower>
class Spectra::DenseSymShiftSolve< Scalar, Uplo >

This class defines the shift-solve operation on a 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 DenseSymShiftSolve.h.

Constructor & Destructor Documentation

◆ DenseSymShiftSolve()

template<typename Scalar , int Uplo = Eigen::Lower>
Spectra::DenseSymShiftSolve< Scalar, Uplo >::DenseSymShiftSolve ( ConstGenericMatrix &  mat_)
inline

Constructor to create the matrix operation object.

Parameters
mat_An Eigen matrix object, whose type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>).

Definition at line 49 of file DenseSymShiftSolve.h.

Member Function Documentation

◆ rows()

template<typename Scalar , int Uplo = Eigen::Lower>
int Spectra::DenseSymShiftSolve< Scalar, Uplo >::rows ( ) const
inline

Return the number of rows of the underlying matrix.

Definition at line 60 of file DenseSymShiftSolve.h.

◆ cols()

template<typename Scalar , int Uplo = Eigen::Lower>
int Spectra::DenseSymShiftSolve< Scalar, Uplo >::cols ( ) const
inline

Return the number of columns of the underlying matrix.

Definition at line 64 of file DenseSymShiftSolve.h.

◆ set_shift()

template<typename Scalar , int Uplo = Eigen::Lower>
void Spectra::DenseSymShiftSolve< Scalar, Uplo >::set_shift ( Scalar  sigma)
inline

Set the real shift \(\sigma\).

Definition at line 69 of file DenseSymShiftSolve.h.

◆ perform_op()

template<typename Scalar , int Uplo = Eigen::Lower>
void Spectra::DenseSymShiftSolve< Scalar, Uplo >::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 81 of file DenseSymShiftSolve.h.


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