MUQ  0.4.3
muq::SamplingAlgorithms::MIMCMCBox Class Reference

Representation of a Multiindex MCMC telescoping sum component. More...

#include <MIMCMCBox.h>

Detailed Description

Representation of a Multiindex MCMC telescoping sum component.

This holds Markov chains whose differences are estimated in one component of the telescoping sum of an MIMCMC method. In the multilevel case, this contains two neighboring chains and allows computing their difference in expectation value; for multiindex, it extends to arbitrary dimensions.

Definition at line 29 of file MIMCMCBox.h.

Public Member Functions

 MIMCMCBox (std::shared_ptr< MIComponentFactory > componentFactory, std::shared_ptr< MultiIndex > boxHighestIndex)
 
void Sample ()
 
Eigen::VectorXd MeanParam ()
 
Eigen::VectorXd MeanQOI ()
 
void DrawChain (std::shared_ptr< SingleChainMCMC > chain, std::string chainid, std::ofstream &graphfile) const
 
void Draw (std::ofstream &graphfile, bool drawSamples=true) const
 
std::shared_ptr< SingleChainMCMCFinestChain ()
 
std::shared_ptr< SingleChainMCMCGetChain (std::shared_ptr< MultiIndex > index)
 
std::shared_ptr< MultiIndexSet > GetBoxIndices ()
 
std::shared_ptr< AbstractSamplingProblemGetFinestProblem ()
 
std::shared_ptr< MultiIndex > GetHighestIndex ()
 
std::shared_ptr< MultiIndex > GetLowestIndex ()
 
std::shared_ptr< SampleCollectionGetQOIDiff ()
 
void WriteToFile (std::string filename)
 

Constructor & Destructor Documentation

◆ MIMCMCBox()

MIMCMCBox::MIMCMCBox ( std::shared_ptr< MIComponentFactory componentFactory,
std::shared_ptr< MultiIndex >  boxHighestIndex 
)

Member Function Documentation

◆ CreateRootPath()

std::shared_ptr< MultiIndexSet > MIMCMCBox::CreateRootPath ( std::shared_ptr< MultiIndex >  index)
private

Definition at line 298 of file MIMCMCBox.cpp.

Referenced by MIMCMCBox().

◆ Draw()

void MIMCMCBox::Draw ( std::ofstream &  graphfile,
bool  drawSamples = true 
) const

◆ DrawChain()

void MIMCMCBox::DrawChain ( std::shared_ptr< SingleChainMCMC chain,
std::string  chainid,
std::ofstream &  graphfile 
) const

Definition at line 201 of file MIMCMCBox.cpp.

References nlohmann::to_string().

Referenced by Draw().

◆ FinestChain()

std::shared_ptr< SingleChainMCMC > MIMCMCBox::FinestChain ( )

Definition at line 282 of file MIMCMCBox.cpp.

References boxChains, boxHighestIndex, boxIndices, and boxLowestIndex.

◆ GetBoxIndices()

std::shared_ptr< MultiIndexSet > MIMCMCBox::GetBoxIndices ( )

Definition at line 287 of file MIMCMCBox.cpp.

References boxIndices.

◆ GetChain()

std::shared_ptr< SingleChainMCMC > MIMCMCBox::GetChain ( std::shared_ptr< MultiIndex >  index)

Definition at line 291 of file MIMCMCBox.cpp.

References boxChains, and boxIndices.

◆ GetFinestProblem()

std::shared_ptr< AbstractSamplingProblem > MIMCMCBox::GetFinestProblem ( )

Definition at line 115 of file MIMCMCBox.cpp.

References finestProblem.

Referenced by MeanParam(), and Sample().

◆ GetHighestIndex()

std::shared_ptr< MultiIndex > MIMCMCBox::GetHighestIndex ( )

Definition at line 107 of file MIMCMCBox.cpp.

References boxHighestIndex.

◆ GetLowestIndex()

std::shared_ptr< MultiIndex > MIMCMCBox::GetLowestIndex ( )

Definition at line 111 of file MIMCMCBox.cpp.

References boxLowestIndex.

◆ GetQOIDiff()

std::shared_ptr< SampleCollection > MIMCMCBox::GetQOIDiff ( )

Definition at line 176 of file MIMCMCBox.cpp.

References QOIDiff.

◆ MeanParam()

Eigen::VectorXd MIMCMCBox::MeanParam ( )

Definition at line 180 of file MIMCMCBox.cpp.

References boxChains, boxHighestIndex, boxIndices, boxLowestIndex, and GetFinestProblem().

◆ MeanQOI()

Eigen::VectorXd MIMCMCBox::MeanQOI ( )

Definition at line 172 of file MIMCMCBox.cpp.

References QOIDiff.

◆ Sample()

void MIMCMCBox::Sample ( )

◆ WriteToFile()

void MIMCMCBox::WriteToFile ( std::string  filename)

Definition at line 162 of file MIMCMCBox.cpp.

References boxChains, boxHighestIndex, boxIndices, and QOIDiff.

Member Data Documentation

◆ boxChains

std::vector<std::shared_ptr<SingleChainMCMC> > muq::SamplingAlgorithms::MIMCMCBox::boxChains
private

Definition at line 71 of file MIMCMCBox.h.

Referenced by Draw(), FinestChain(), GetChain(), MeanParam(), MIMCMCBox(), Sample(), and WriteToFile().

◆ boxHighestIndex

std::shared_ptr<MultiIndex> muq::SamplingAlgorithms::MIMCMCBox::boxHighestIndex
private

Definition at line 68 of file MIMCMCBox.h.

Referenced by Draw(), FinestChain(), GetHighestIndex(), MeanParam(), MIMCMCBox(), Sample(), and WriteToFile().

◆ boxIndices

std::shared_ptr<MultiIndexSet> muq::SamplingAlgorithms::MIMCMCBox::boxIndices
private

◆ boxLowestIndex

std::shared_ptr<MultiIndex> muq::SamplingAlgorithms::MIMCMCBox::boxLowestIndex
private

Definition at line 69 of file MIMCMCBox.h.

Referenced by FinestChain(), GetLowestIndex(), MeanParam(), MIMCMCBox(), and Sample().

◆ componentFactory

std::shared_ptr<MIComponentFactory> muq::SamplingAlgorithms::MIMCMCBox::componentFactory
private

Definition at line 67 of file MIMCMCBox.h.

Referenced by MIMCMCBox().

◆ finestProblem

std::shared_ptr<AbstractSamplingProblem> muq::SamplingAlgorithms::MIMCMCBox::finestProblem
private

Definition at line 73 of file MIMCMCBox.h.

Referenced by GetFinestProblem(), and MIMCMCBox().

◆ QOIDiff

std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::MIMCMCBox::QOIDiff
private

Definition at line 65 of file MIMCMCBox.h.

Referenced by GetQOIDiff(), MeanQOI(), Sample(), and WriteToFile().

◆ tailChains

std::vector<std::shared_ptr<SingleChainMCMC> > muq::SamplingAlgorithms::MIMCMCBox::tailChains
private

Definition at line 72 of file MIMCMCBox.h.

Referenced by Draw(), and MIMCMCBox().


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