Spectra::SymShiftInvert< Scalar_, TypeA, TypeB, UploA, UploB, FlagsA, FlagsB, StorageIndexA, StorageIndexB > Class Template Reference
Description
template<typename Scalar_, typename TypeA = Eigen::Sparse, typename TypeB = Eigen::Sparse, int UploA = Eigen::Lower, int UploB = Eigen::Lower, int FlagsA = Eigen::ColMajor, int FlagsB = Eigen::ColMajor, typename StorageIndexA = int, typename StorageIndexB = int>
class Spectra::SymShiftInvert< Scalar_, TypeA, TypeB, UploA, UploB, FlagsA, FlagsB, StorageIndexA, StorageIndexB >
This class defines matrix operations required by the generalized eigen solver in the shift-and-invert mode. Given two symmetric matrices \(A\) and \(B\), it solves the linear equation \(y=(A-\sigma B)^{-1}x\), where \(\sigma\) is a real shift. Each of \(A\) and \(B\) can be a dense or sparse matrix.
This class is intended to be used with the SymGEigsShiftSolver generalized eigen solver.
- Template Parameters
-
Scalar_ The element type of the matrices. Currently supported types are float,double, andlong double.TypeA The type of the \(A\) matrix, indicating whether \(A\) is dense or sparse. Possible values are Eigen::DenseandEigen::Sparse.TypeB The type of the \(B\) matrix, indicating whether \(B\) is dense or sparse. Possible values are Eigen::DenseandEigen::Sparse.UploA Whether the lower or upper triangular part of \(A\) should be used. Possible values are Eigen::LowerandEigen::Upper.UploB Whether the lower or upper triangular part of \(B\) should be used. Possible values are Eigen::LowerandEigen::Upper.FlagsA Additional flags for the matrix class of \(A\). Possible values are Eigen::ColMajorandEigen::RowMajor.FlagsB Additional flags for the matrix class of \(B\). Possible values are Eigen::ColMajorandEigen::RowMajor.StorageIndexA The storage index type of the \(A\) matrix, only used when \(A\) is a sparse matrix. StorageIndexB The storage index type of the \(B\) matrix, only used when \(B\) is a sparse matrix.
#include <SymShiftInvert.h>
Public Types | |
| using | Scalar = Scalar_ |
| Element type of the matrix. | |
Public Member Functions | |
| template<typename DerivedA , typename DerivedB > | |
| SymShiftInvert (const Eigen::EigenBase< DerivedA > &A, const Eigen::EigenBase< DerivedB > &B) | |
| Constructor to create the matrix operation object. More... | |
| Index | rows () const |
| Return the number of rows of the underlying matrix. | |
| Index | cols () const |
| Return the number of columns of the underlying matrix. | |
| void | set_shift (const Scalar &sigma) |
| Set the real shift \(\sigma\). | |
| void | perform_op (const Scalar *x_in, Scalar *y_out) const |
| Perform the shift-invert operation \(y=(A-\sigma B)^{-1}x\). More... | |
Constructor & Destructor Documentation
◆ SymShiftInvert()
template<typename Scalar_ , typename TypeA = Eigen::Sparse, typename TypeB = Eigen::Sparse, int UploA = Eigen::Lower, int UploB = Eigen::Lower, int FlagsA = Eigen::ColMajor, int FlagsB = Eigen::ColMajor, typename StorageIndexA = int, typename StorageIndexB = int>
template<typename DerivedA , typename DerivedB >
|
inline |
Constructor to create the matrix operation object.
- Parameters
-
A A dense or sparse matrix object, whose type can be Eigen::Matrix<...>,Eigen::SparseMatrix<...>,Eigen::Map<Eigen::Matrix<...>>,Eigen::Map<Eigen::SparseMatrix<...>>,Eigen::Ref<Eigen::Matrix<...>>,Eigen::Ref<Eigen::SparseMatrix<...>>, etc.B A dense or sparse matrix object.
Member Function Documentation
◆ perform_op()
template<typename Scalar_ , typename TypeA = Eigen::Sparse, typename TypeB = Eigen::Sparse, int UploA = Eigen::Lower, int UploB = Eigen::Lower, int FlagsA = Eigen::ColMajor, int FlagsB = Eigen::ColMajor, typename StorageIndexA = int, typename StorageIndexB = int>
|
inline |
Perform the shift-invert operation \(y=(A-\sigma B)^{-1}x\).
- Parameters
-
x_in Pointer to the \(x\) vector. y_out Pointer to the \(y\) vector.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_thirdparty/spectra/Spectra/MatOp/SymShiftInvert.h