15#include <Eigen/Sparse>
17namespace lagrange::solver {
22enum class Status { Successful, NotComputed, NotConverging, NumericalIssue };
29template <
typename Scalar>
36 Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>
eigenvectors;
42 Status
info = Status::NotComputed;
60template <
typename Scalar>
61EigenResult<Scalar> selfadjoint_eigen_largest(
const Eigen::SparseMatrix<Scalar>& A,
size_t k);
76template <
typename Scalar>
77EigenResult<Scalar> selfadjoint_eigen_smallest(
const Eigen::SparseMatrix<Scalar>& A,
size_t k);
96template <
typename Scalar>
97EigenResult<Scalar> generalized_selfadjoint_eigen_largest(
98 const Eigen::SparseMatrix<Scalar>& A,
99 const Eigen::SparseMatrix<Scalar>& M,
120template <
typename Scalar>
121EigenResult<Scalar> generalized_selfadjoint_eigen_smallest(
122 const Eigen::SparseMatrix<Scalar>& A,
123 const Eigen::SparseMatrix<Scalar>& M,
Result structure for eigenvalue computations.
Definition eigen_solvers.h:31
size_t num_converged
Number of converged eigenvalues.
Definition eigen_solvers.h:39
Status info
Computation status.
Definition eigen_solvers.h:42
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > eigenvalues
Computed eigenvalues.
Definition eigen_solvers.h:33
bool is_successful() const
Check if the computation was successful.
Definition eigen_solvers.h:45
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > eigenvectors
Computed eigenvectors (column-wise).
Definition eigen_solvers.h:36