Spectra
1.0.1
Header-only C++ Library for Large Scale Eigenvalue Problems
|
#include <Spectra/MatOp/SymShiftInvert.h>
Public Types | |
using | Scalar = Scalar_ |
Public Member Functions | |
template<typename DerivedA , typename DerivedB > | |
SymShiftInvert (const Eigen::EigenBase< DerivedA > &A, const Eigen::EigenBase< DerivedB > &B) | |
Index | rows () const |
Index | cols () const |
void | set_shift (const Scalar &sigma) |
void | perform_op (const Scalar *x_in, Scalar *y_out) const |
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.
Scalar_ | The element type of the matrices. Currently supported types are float , double , and long double . |
TypeA | The type of the \(A\) matrix, indicating whether \(A\) is dense or sparse. Possible values are Eigen::Dense and Eigen::Sparse . |
TypeB | The type of the \(B\) matrix, indicating whether \(B\) is dense or sparse. Possible values are Eigen::Dense and Eigen::Sparse . |
UploA | Whether the lower or upper triangular part of \(A\) should be used. Possible values are Eigen::Lower and Eigen::Upper . |
UploB | Whether the lower or upper triangular part of \(B\) should be used. Possible values are Eigen::Lower and Eigen::Upper . |
FlagsA | Additional flags for the matrix class of \(A\). Possible values are Eigen::ColMajor and Eigen::RowMajor . |
FlagsB | Additional flags for the matrix class of \(B\). Possible values are Eigen::ColMajor and Eigen::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. |
Definition at line 127 of file SymShiftInvert.h.
using Spectra::SymShiftInvert< Scalar_, TypeA, TypeB, UploA, UploB, FlagsA, FlagsB, StorageIndexA, StorageIndexB >::Scalar = Scalar_ |
Element type of the matrix.
Definition at line 133 of file SymShiftInvert.h.
|
inline |
Constructor to create the matrix operation object.
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. |
Definition at line 191 of file SymShiftInvert.h.
|
inline |
Return the number of rows of the underlying matrix.
Definition at line 209 of file SymShiftInvert.h.
|
inline |
Return the number of columns of the underlying matrix.
Definition at line 213 of file SymShiftInvert.h.
|
inline |
Set the real shift \(\sigma\).
Definition at line 218 of file SymShiftInvert.h.
|
inline |
Perform the shift-invert operation \(y=(A-\sigma B)^{-1}x\).
x_in | Pointer to the \(x\) vector. |
y_out | Pointer to the \(y\) vector. |
Definition at line 235 of file SymShiftInvert.h.