MUQ  0.4.3
StochasticEigenSolver.h
Go to the documentation of this file.
1 #ifndef STOCHASTICEIGENSOLVER_H
2 #define STOCHASTICEIGENSOLVER_H
3 
5 #include <boost/property_tree/ptree_fwd.hpp>
6 
7 namespace muq{
8 namespace Modeling{
9 
29 
30 public:
31 
32  StochasticEigenSolver(int numEigsIn,
33  double eigRelTolIn=0.0,
34  double eigAbsTolIn=0.0,
35  int expectedRankIn=-1,
36  int samplingFactorIn=-1,
37  int blockSize=10,
38  int verbosityIn=0);
51  StochasticEigenSolver(boost::property_tree::ptree const& options);
52 
56  virtual StochasticEigenSolver& compute(std::shared_ptr<LinearOperator> const& A,
57  std::shared_ptr<LinearOperator> B = nullptr,
58  std::shared_ptr<LinearOperator> Binv = nullptr);
59 
60 
61 private:
62 
67  std::pair<Eigen::MatrixXd, Eigen::MatrixXd> CholeskyQR(Eigen::MatrixXd const& Y,
68  std::shared_ptr<LinearOperator> const& B) const;
69 
70  int numEigs;
71  double eigRelTol;
72  double eigAbsTol;
75  int blockSize;
76  int verbosity;
77 };
78 
79 } // namespace Modeling
80 } // namespace muq
81 
82 #endif // #ifndef STOCHASTICEIGENSOLVER_H
Abstract base class for operator based generalized eigenvalue solvers.
std::shared_ptr< LinearOperator > A
std::shared_ptr< LinearOperator > B
Two-pass stochastic algorithm for computing generalized eigenvalues from matrix products.
StochasticEigenSolver(int numEigsIn, double eigRelTolIn=0.0, double eigAbsTolIn=0.0, int expectedRankIn=-1, int samplingFactorIn=-1, int blockSize=10, int verbosityIn=0)
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > CholeskyQR(Eigen::MatrixXd const &Y, std::shared_ptr< LinearOperator > const &B) const
virtual StochasticEigenSolver & compute(std::shared_ptr< LinearOperator > const &A, std::shared_ptr< LinearOperator > B=nullptr, std::shared_ptr< LinearOperator > Binv=nullptr)