MUQ  0.4.3
DefaultComponentFactory.h
Go to the documentation of this file.
1 #ifndef DEFAULTCOMPONENTFACTORY_H
2 #define DEFAULTCOMPONENTFACTORY_H
3 
6 
7 #include <boost/property_tree/ptree_fwd.hpp>
8 
9 namespace muq{
10 namespace SamplingAlgorithms{
11 
12 
18 public:
19 
20  DefaultComponentFactory(boost::property_tree::ptree options,
21  Eigen::VectorXd startingPoint,
22  std::vector<std::shared_ptr<AbstractSamplingProblem>> const& problems);
23 
24  DefaultComponentFactory(boost::property_tree::ptree options,
25  Eigen::VectorXd startingPoint,
26  std::shared_ptr<MultiIndexSet> const& problemIndices,
27  std::vector<std::shared_ptr<AbstractSamplingProblem>> const& problems);
28 
29  virtual ~DefaultComponentFactory() = default;
30 
31  virtual std::shared_ptr<MCMCProposal> Proposal (std::shared_ptr<MultiIndex> const& index,
32  std::shared_ptr<AbstractSamplingProblem> const& samplingProblem) override ;
33 
34  virtual std::shared_ptr<MultiIndex> FinestIndex() override;
35 
36  virtual std::shared_ptr<MCMCProposal> CoarseProposal (std::shared_ptr<MultiIndex> const& fineIndex,
37  std::shared_ptr<MultiIndex> const& coarseIndex,
38  std::shared_ptr<AbstractSamplingProblem> const& coarseProblem,
39  std::shared_ptr<SingleChainMCMC> const& coarseChain) override;
40 
41  virtual std::shared_ptr<AbstractSamplingProblem> SamplingProblem (std::shared_ptr<MultiIndex> const& index) override;
42 
43  virtual std::shared_ptr<MIInterpolation> Interpolation (std::shared_ptr<MultiIndex> const& index) override;
44 
45  virtual Eigen::VectorXd StartingPoint (std::shared_ptr<MultiIndex> const& index) override;
46 
47 private:
48  boost::property_tree::ptree options;
49  Eigen::VectorXd startingPoint;
50  std::shared_ptr<MultiIndexSet> problemIndices;
51  std::vector<std::shared_ptr<AbstractSamplingProblem>> problems;
52 };
53 
54 }
55 }
56 
57 
58 
59 #endif // #ifndef DEFAULTCOMPONENTFACTORY_H
Provides a high level interface for the sampling problems on each MIMCMC level.
virtual Eigen::VectorXd StartingPoint(std::shared_ptr< MultiIndex > const &index) override
std::vector< std::shared_ptr< AbstractSamplingProblem > > problems
virtual std::shared_ptr< AbstractSamplingProblem > SamplingProblem(std::shared_ptr< MultiIndex > const &index) override
virtual std::shared_ptr< MCMCProposal > CoarseProposal(std::shared_ptr< MultiIndex > const &fineIndex, std::shared_ptr< MultiIndex > const &coarseIndex, std::shared_ptr< AbstractSamplingProblem > const &coarseProblem, std::shared_ptr< SingleChainMCMC > const &coarseChain) override
DefaultComponentFactory(boost::property_tree::ptree options, Eigen::VectorXd startingPoint, std::vector< std::shared_ptr< AbstractSamplingProblem >> const &problems)
virtual std::shared_ptr< MIInterpolation > Interpolation(std::shared_ptr< MultiIndex > const &index) override
virtual std::shared_ptr< MultiIndex > FinestIndex() override
virtual std::shared_ptr< MCMCProposal > Proposal(std::shared_ptr< MultiIndex > const &index, std::shared_ptr< AbstractSamplingProblem > const &samplingProblem) override
DefaultComponentFactory(boost::property_tree::ptree options, Eigen::VectorXd startingPoint, std::shared_ptr< MultiIndexSet > const &problemIndices, std::vector< std::shared_ptr< AbstractSamplingProblem >> const &problems)
Interface defining models on a multiindex structure.