4 namespace SamplingAlgorithms {
6 SLMCMC::SLMCMC (pt::ptree pt, std::shared_ptr<MIComponentFactory> componentFactory, std::shared_ptr<MultiIndex> index)
7 : componentFactory(componentFactory)
11 assert(index->GetLength() == finestIndex->GetLength());
15 ptBlockID.put(
"BlockIndex",0);
20 std::vector<std::shared_ptr<TransitionKernel>> kernels(1);
21 kernels[0] = std::make_shared<MHKernel>(ptBlockID,problem,proposal);
25 single_chain = std::make_shared<SingleChainMCMC>(pt,kernels);
29 SLMCMC::SLMCMC (pt::ptree pt, std::shared_ptr<MIComponentFactory> componentFactory)
30 :
SLMCMC(pt,componentFactory, componentFactory->FinestIndex()) { }
47 QOI->WriteToFile(filename,
"/qois");
48 samps->WriteToFile(filename,
"/samples");
Single-level MCMC for multiindex sampling problems.
virtual std::shared_ptr< MarkovChain > GetSamples() const
SLMCMC(pt::ptree pt, std::shared_ptr< MIComponentFactory > componentFactory, std::shared_ptr< MultiIndex > index)
std::shared_ptr< SingleChainMCMC > single_chain
std::shared_ptr< MIComponentFactory > componentFactory
virtual std::shared_ptr< MarkovChain > GetQOIs() const
void WriteToFile(std::string filename)
virtual std::shared_ptr< MarkovChain > Run()