Representation of a Multiindex MCMC telescoping sum component. More...
#include <MIMCMCBox.h>
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< SingleChainMCMC > | FinestChain () |
std::shared_ptr< SingleChainMCMC > | GetChain (std::shared_ptr< MultiIndex > index) |
std::shared_ptr< MultiIndexSet > | GetBoxIndices () |
std::shared_ptr< AbstractSamplingProblem > | GetFinestProblem () |
std::shared_ptr< MultiIndex > | GetHighestIndex () |
std::shared_ptr< MultiIndex > | GetLowestIndex () |
std::shared_ptr< SampleCollection > | GetQOIDiff () |
void | WriteToFile (std::string filename) |
MIMCMCBox::MIMCMCBox | ( | std::shared_ptr< MIComponentFactory > | componentFactory, |
std::shared_ptr< MultiIndex > | boxHighestIndex | ||
) |
Definition at line 8 of file MIMCMCBox.cpp.
References boxChains, boxHighestIndex, boxIndices, boxLowestIndex, componentFactory, CreateRootPath(), finestProblem, and tailChains.
|
private |
Definition at line 298 of file MIMCMCBox.cpp.
Referenced by MIMCMCBox().
void MIMCMCBox::Draw | ( | std::ofstream & | graphfile, |
bool | drawSamples = true |
||
) | const |
Definition at line 239 of file MIMCMCBox.cpp.
References boxChains, boxHighestIndex, boxIndices, DrawChain(), tailChains, and nlohmann::to_string().
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().
std::shared_ptr< SingleChainMCMC > MIMCMCBox::FinestChain | ( | ) |
Definition at line 282 of file MIMCMCBox.cpp.
References boxChains, boxHighestIndex, boxIndices, and boxLowestIndex.
std::shared_ptr< MultiIndexSet > MIMCMCBox::GetBoxIndices | ( | ) |
Definition at line 287 of file MIMCMCBox.cpp.
References boxIndices.
std::shared_ptr< SingleChainMCMC > MIMCMCBox::GetChain | ( | std::shared_ptr< MultiIndex > | index | ) |
Definition at line 291 of file MIMCMCBox.cpp.
References boxChains, and boxIndices.
std::shared_ptr< AbstractSamplingProblem > MIMCMCBox::GetFinestProblem | ( | ) |
Definition at line 115 of file MIMCMCBox.cpp.
References finestProblem.
Referenced by MeanParam(), and Sample().
std::shared_ptr< MultiIndex > MIMCMCBox::GetHighestIndex | ( | ) |
Definition at line 107 of file MIMCMCBox.cpp.
References boxHighestIndex.
std::shared_ptr< MultiIndex > MIMCMCBox::GetLowestIndex | ( | ) |
Definition at line 111 of file MIMCMCBox.cpp.
References boxLowestIndex.
std::shared_ptr< SampleCollection > MIMCMCBox::GetQOIDiff | ( | ) |
Definition at line 176 of file MIMCMCBox.cpp.
References QOIDiff.
Eigen::VectorXd MIMCMCBox::MeanParam | ( | ) |
Definition at line 180 of file MIMCMCBox.cpp.
References boxChains, boxHighestIndex, boxIndices, boxLowestIndex, and GetFinestProblem().
Eigen::VectorXd MIMCMCBox::MeanQOI | ( | ) |
Definition at line 172 of file MIMCMCBox.cpp.
References QOIDiff.
void MIMCMCBox::Sample | ( | ) |
Definition at line 119 of file MIMCMCBox.cpp.
References boxChains, boxHighestIndex, boxIndices, boxLowestIndex, GetFinestProblem(), and QOIDiff.
void MIMCMCBox::WriteToFile | ( | std::string | filename | ) |
Definition at line 162 of file MIMCMCBox.cpp.
References boxChains, boxHighestIndex, boxIndices, and QOIDiff.
|
private |
Definition at line 71 of file MIMCMCBox.h.
Referenced by Draw(), FinestChain(), GetChain(), MeanParam(), MIMCMCBox(), Sample(), and WriteToFile().
|
private |
Definition at line 68 of file MIMCMCBox.h.
Referenced by Draw(), FinestChain(), GetHighestIndex(), MeanParam(), MIMCMCBox(), Sample(), and WriteToFile().
|
private |
Definition at line 70 of file MIMCMCBox.h.
Referenced by Draw(), FinestChain(), GetBoxIndices(), GetChain(), MeanParam(), MIMCMCBox(), Sample(), and WriteToFile().
|
private |
Definition at line 69 of file MIMCMCBox.h.
Referenced by FinestChain(), GetLowestIndex(), MeanParam(), MIMCMCBox(), and Sample().
|
private |
Definition at line 67 of file MIMCMCBox.h.
Referenced by MIMCMCBox().
|
private |
Definition at line 73 of file MIMCMCBox.h.
Referenced by GetFinestProblem(), and MIMCMCBox().
|
private |
Definition at line 65 of file MIMCMCBox.h.
Referenced by GetQOIDiff(), MeanQOI(), Sample(), and WriteToFile().
|
private |
Definition at line 72 of file MIMCMCBox.h.
Referenced by Draw(), and MIMCMCBox().