Spectra
Spectra::DenseGenRealShiftSolve< Scalar > Class Template Reference

#include <DenseGenRealShiftSolve.h>

Public Member Functions

 DenseGenRealShiftSolve (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>
class Spectra::DenseGenRealShiftSolve< Scalar >

This class defines the shift-solve operation on a general 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 25 of file DenseGenRealShiftSolve.h.

Constructor & Destructor Documentation

◆ DenseGenRealShiftSolve()

template<typename Scalar >
Spectra::DenseGenRealShiftSolve< Scalar >::DenseGenRealShiftSolve ( 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 DenseGenRealShiftSolve.h.

Member Function Documentation

◆ rows()

template<typename Scalar >
int Spectra::DenseGenRealShiftSolve< Scalar >::rows ( ) const
inline

Return the number of rows of the underlying matrix.

Definition at line 60 of file DenseGenRealShiftSolve.h.

◆ cols()

template<typename Scalar >
int Spectra::DenseGenRealShiftSolve< Scalar >::cols ( ) const
inline

Return the number of columns of the underlying matrix.

Definition at line 64 of file DenseGenRealShiftSolve.h.

◆ set_shift()

template<typename Scalar >
void Spectra::DenseGenRealShiftSolve< Scalar >::set_shift ( Scalar  sigma)
inline

Set the real shift \(\sigma\).

Definition at line 69 of file DenseGenRealShiftSolve.h.

◆ perform_op()

template<typename Scalar >
void Spectra::DenseGenRealShiftSolve< Scalar >::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 DenseGenRealShiftSolve.h.


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