Spectra
Spectra::DenseGenComplexShiftSolve< Scalar > Class Template Reference

#include <Spectra/MatOp/DenseGenComplexShiftSolve.h>

Public Member Functions

 DenseGenComplexShiftSolve (ConstGenericMatrix &mat)
 
int rows () const
 
int cols () const
 
void set_shift (Scalar sigmar, Scalar sigmai)
 
void perform_op (const Scalar *x_in, Scalar *y_out)
 

Detailed Description

template<typename Scalar>
class Spectra::DenseGenComplexShiftSolve< Scalar >

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

Definition at line 26 of file DenseGenComplexShiftSolve.h.

Constructor & Destructor Documentation

◆ DenseGenComplexShiftSolve()

template<typename Scalar >
Spectra::DenseGenComplexShiftSolve< Scalar >::DenseGenComplexShiftSolve ( ConstGenericMatrix &  mat)
inline

Constructor to create the matrix operation object.

Parameters
matAn 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 55 of file DenseGenComplexShiftSolve.h.

Member Function Documentation

◆ rows()

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

Return the number of rows of the underlying matrix.

Definition at line 65 of file DenseGenComplexShiftSolve.h.

◆ cols()

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

Return the number of columns of the underlying matrix.

Definition at line 69 of file DenseGenComplexShiftSolve.h.

◆ set_shift()

template<typename Scalar >
void Spectra::DenseGenComplexShiftSolve< Scalar >::set_shift ( Scalar  sigmar,
Scalar  sigmai 
)
inline

Set the complex shift \(\sigma\).

Parameters
sigmarReal part of \(\sigma\).
sigmaiImaginary part of \(\sigma\).

Definition at line 77 of file DenseGenComplexShiftSolve.h.

◆ perform_op()

template<typename Scalar >
void Spectra::DenseGenComplexShiftSolve< Scalar >::perform_op ( const Scalar *  x_in,
Scalar *  y_out 
)
inline

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

Parameters
x_inPointer to the \(x\) vector.
y_outPointer to the \(y\) vector.

Definition at line 92 of file DenseGenComplexShiftSolve.h.


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