7 #include <boost/property_tree/ptree.hpp>
13 Eigen::VectorXd startingPoint,
14 std::vector<std::shared_ptr<AbstractSamplingProblem>>
const& problemsIn)
21 Eigen::VectorXd startingPointIn,
22 std::shared_ptr<MultiIndexSet>
const& problemIndicesIn,
23 std::vector<std::shared_ptr<AbstractSamplingProblem>>
const& problemsIn)
25 startingPoint(startingPointIn),
26 problemIndices(problemIndicesIn),
33 std::shared_ptr<AbstractSamplingProblem>
const& problem)
36 boost::property_tree::ptree subTree =
options.get_child(
"Proposal");
37 subTree.put(
"BlockIndex",0);
47 return std::make_shared<MultiIndex>(
problemIndices->GetMaxOrders());
51 std::shared_ptr<MultiIndex>
const& coarseIndex,
52 std::shared_ptr<AbstractSamplingProblem>
const& coarseProblem,
53 std::shared_ptr<SingleChainMCMC>
const& coarseChain)
55 boost::property_tree::ptree ptProposal =
options;
56 ptProposal.put(
"BlockIndex",0);
57 return std::make_shared<SubsamplingMIProposal>(ptProposal, coarseProblem, coarseIndex, coarseChain);
67 std::cout <<
"Undefined problem! " << *index << std::endl;
74 return std::make_shared<ConcatenatingInterpolation>(index);
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
std::shared_ptr< MultiIndexSet > problemIndices
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
boost::property_tree::ptree options
Eigen::VectorXd startingPoint
static std::shared_ptr< MCMCProposal > Construct(boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > const &probIn)
Static constructor for the transition kernel.
A factory class with static methods for generating MultiIndexSets.