MUQ  0.4.3
muq::Modeling::GeneralizedEigenSolver Class Reference

Abstract base class for operator based generalized eigenvalue solvers. More...

#include <GeneralizedEigenSolver.h>

Inheritance diagram for muq::Modeling::GeneralizedEigenSolver:

Detailed Description

Abstract base class for operator based generalized eigenvalue solvers.

Base class for algorithms that solve problems of the form

\[ Av = \lambda B v \]

@seealso LOBPCG @seealso StochasticEigenSolver

Definition at line 22 of file GeneralizedEigenSolver.h.

Public Member Functions

virtual ~GeneralizedEigenSolver ()=default
 
Eigen::VectorXd const & eigenvalues () const
 
Eigen::MatrixXd const & eigenvectors () const
 

Constructor & Destructor Documentation

◆ ~GeneralizedEigenSolver()

virtual muq::Modeling::GeneralizedEigenSolver::~GeneralizedEigenSolver ( )
virtualdefault

Member Function Documentation

◆ eigenvalues()

Eigen::VectorXd const& muq::Modeling::GeneralizedEigenSolver::eigenvalues ( ) const
inline

Return a reference to the computed vector of eigenvalues. The vector will only be valid after calling compute.

Definition at line 40 of file GeneralizedEigenSolver.h.

References eigVals.

Referenced by muq::SamplingAlgorithms::DILIKernel::ComputeLocalLIS(), main(), and muq::SamplingAlgorithms::DILIKernel::UpdateLIS().

◆ eigenvectors()

Eigen::MatrixXd const& muq::Modeling::GeneralizedEigenSolver::eigenvectors ( ) const
inline

Return a matrix whose columns contain the computed eigenvectors. The matrix will only be valid after calling compute.

Definition at line 45 of file GeneralizedEigenSolver.h.

References eigVecs.

Referenced by muq::SamplingAlgorithms::DILIKernel::ComputeLocalLIS(), main(), and muq::SamplingAlgorithms::DILIKernel::UpdateLIS().

◆ GetSortSwaps() [1/2]

std::vector< std::pair< int, int > > GeneralizedEigenSolver::GetSortSwaps ( Eigen::Ref< const Eigen::VectorXd > const &  residNorms)
staticprotected

Definition at line 28 of file GeneralizedEigenSolver.cpp.

References GetSortSwaps().

◆ GetSortSwaps() [2/2]

std::vector< std::pair< int, int > > GeneralizedEigenSolver::GetSortSwaps ( Eigen::Ref< const Eigen::VectorXd > const &  residNorms,
std::vector< bool > const &  isActive 
)
staticprotected

Returns a vector of swaps needed to sort the provided matrix using a selection sort.

Definition at line 34 of file GeneralizedEigenSolver.cpp.

Referenced by muq::Modeling::StochasticEigenSolver::compute(), and GetSortSwaps().

◆ SortCols()

void GeneralizedEigenSolver::SortCols ( std::vector< std::pair< int, int >> const &  swapInds,
Eigen::Ref< Eigen::MatrixXd >  matrix 
)
staticprotected

Sorts the columns of the matrix using precomputed swaps from the GetSortSwaps function.

Definition at line 21 of file GeneralizedEigenSolver.cpp.

Referenced by muq::Modeling::StochasticEigenSolver::compute().

◆ SortVec() [1/2]

void GeneralizedEigenSolver::SortVec ( std::vector< std::pair< int, int >> const &  swapInds,
Eigen::Ref< Eigen::VectorXd >  matrix 
)
staticprotected

◆ SortVec() [2/2]

void GeneralizedEigenSolver::SortVec ( std::vector< std::pair< int, int >> const &  swapInds,
std::vector< bool > &  vec 
)
staticprotected

Definition at line 14 of file GeneralizedEigenSolver.cpp.

Member Data Documentation

◆ A

std::shared_ptr<LinearOperator> muq::Modeling::GeneralizedEigenSolver::A
protected

◆ B

std::shared_ptr<LinearOperator> muq::Modeling::GeneralizedEigenSolver::B
protected

◆ eigVals

Eigen::VectorXd muq::Modeling::GeneralizedEigenSolver::eigVals
protected

◆ eigVecs

Eigen::MatrixXd muq::Modeling::GeneralizedEigenSolver::eigVecs
protected

◆ M

std::shared_ptr<LinearOperator> muq::Modeling::GeneralizedEigenSolver::M
protected

Definition at line 71 of file GeneralizedEigenSolver.h.

Referenced by muq::Modeling::LOBPCG::compute().


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