queso-0.57.1
|
A struct that represents a Metropolis-Hastings sample. More...
#include <MetropolisHastingsSG.h>
Public Member Functions | |
Constructor/Destructor methods | |
MHRawChainInfoStruct () | |
Constructor. More... | |
MHRawChainInfoStruct (const MHRawChainInfoStruct &rhs) | |
Copy constructor. More... | |
~MHRawChainInfoStruct () | |
Destructor. More... | |
Set methods | |
MHRawChainInfoStruct & | operator= (const MHRawChainInfoStruct &rhs) |
Assignment operator. More... | |
MHRawChainInfoStruct & | operator+= (const MHRawChainInfoStruct &rhs) |
Addition assignment operator. More... | |
Misc methods | |
void | copy (const MHRawChainInfoStruct &src) |
Copies Metropolis-Hastings chain info from src to this . More... | |
void | reset () |
Resets Metropolis-Hastings chain info. More... | |
void | mpiSum (const MpiComm &comm, MHRawChainInfoStruct &sumInfo) |
Calculates the MPI sum of this . More... | |
Public Attributes | |
double | runTime |
double | candidateRunTime |
double | targetRunTime |
double | mhAlphaRunTime |
double | drAlphaRunTime |
double | drRunTime |
double | amRunTime |
unsigned int | numTargetCalls |
unsigned int | numDRs |
unsigned int | numOutOfTargetSupport |
unsigned int | numOutOfTargetSupportInDR |
unsigned int | numRejections |
A struct that represents a Metropolis-Hastings sample.
Some of the information about the Metropolis-Hastings sample generator includes the allowed number of delayed rejections, number of rejections, number of positions in or out of target support, and so on. This struct is responsible for the storage of such info.
Definition at line 61 of file MetropolisHastingsSG.h.
QUESO::MHRawChainInfoStruct::MHRawChainInfoStruct | ( | ) |
Constructor.
Definition at line 46 of file MetropolisHastingsSG.C.
References reset().
QUESO::MHRawChainInfoStruct::MHRawChainInfoStruct | ( | const MHRawChainInfoStruct & | rhs | ) |
Copy constructor.
Definition at line 51 of file MetropolisHastingsSG.C.
References copy().
QUESO::MHRawChainInfoStruct::~MHRawChainInfoStruct | ( | ) |
void QUESO::MHRawChainInfoStruct::copy | ( | const MHRawChainInfoStruct & | src | ) |
Copies Metropolis-Hastings chain info from src
to this
.
Definition at line 106 of file MetropolisHastingsSG.C.
References amRunTime, candidateRunTime, drAlphaRunTime, drRunTime, mhAlphaRunTime, numDRs, numOutOfTargetSupport, numOutOfTargetSupportInDR, numRejections, numTargetCalls, runTime, and targetRunTime.
Referenced by MHRawChainInfoStruct(), and operator=().
void QUESO::MHRawChainInfoStruct::mpiSum | ( | const MpiComm & | comm, |
MHRawChainInfoStruct & | sumInfo | ||
) |
Calculates the MPI sum of this
.
Definition at line 126 of file MetropolisHastingsSG.C.
References QUESO::MpiComm::Allreduce(), numTargetCalls, and runTime.
MHRawChainInfoStruct & QUESO::MHRawChainInfoStruct::operator+= | ( | const MHRawChainInfoStruct & | rhs | ) |
Addition assignment operator.
Definition at line 68 of file MetropolisHastingsSG.C.
References amRunTime, candidateRunTime, drAlphaRunTime, drRunTime, mhAlphaRunTime, numDRs, numOutOfTargetSupport, numOutOfTargetSupportInDR, numRejections, numTargetCalls, runTime, and targetRunTime.
MHRawChainInfoStruct & QUESO::MHRawChainInfoStruct::operator= | ( | const MHRawChainInfoStruct & | rhs | ) |
Assignment operator.
Definition at line 61 of file MetropolisHastingsSG.C.
References copy().
void QUESO::MHRawChainInfoStruct::reset | ( | ) |
Resets Metropolis-Hastings chain info.
Definition at line 88 of file MetropolisHastingsSG.C.
References amRunTime, candidateRunTime, drAlphaRunTime, drRunTime, mhAlphaRunTime, numDRs, numOutOfTargetSupport, numOutOfTargetSupportInDR, numRejections, numTargetCalls, runTime, and targetRunTime.
Referenced by MHRawChainInfoStruct().
double QUESO::MHRawChainInfoStruct::amRunTime |
Definition at line 102 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
double QUESO::MHRawChainInfoStruct::candidateRunTime |
Definition at line 97 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
double QUESO::MHRawChainInfoStruct::drAlphaRunTime |
Definition at line 100 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
double QUESO::MHRawChainInfoStruct::drRunTime |
Definition at line 101 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
double QUESO::MHRawChainInfoStruct::mhAlphaRunTime |
Definition at line 99 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
unsigned int QUESO::MHRawChainInfoStruct::numDRs |
Definition at line 105 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
unsigned int QUESO::MHRawChainInfoStruct::numOutOfTargetSupport |
Definition at line 106 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
unsigned int QUESO::MHRawChainInfoStruct::numOutOfTargetSupportInDR |
Definition at line 107 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().
unsigned int QUESO::MHRawChainInfoStruct::numRejections |
Definition at line 108 of file MetropolisHastingsSG.h.
Referenced by copy(), QUESO::MLSampling< P_V, P_M >::generateBalLinkedChains_all(), QUESO::MLSampling< P_V, P_M >::generateUnbLinkedChains_all(), operator+=(), and reset().
unsigned int QUESO::MHRawChainInfoStruct::numTargetCalls |
Definition at line 104 of file MetropolisHastingsSG.h.
Referenced by copy(), mpiSum(), operator+=(), and reset().
double QUESO::MHRawChainInfoStruct::runTime |
Definition at line 96 of file MetropolisHastingsSG.h.
Referenced by copy(), QUESO::MLSampling< P_V, P_M >::generateBalLinkedChains_all(), QUESO::MLSampling< P_V, P_M >::generateUnbLinkedChains_all(), mpiSum(), operator+=(), and reset().
double QUESO::MHRawChainInfoStruct::targetRunTime |
Definition at line 98 of file MetropolisHastingsSG.h.
Referenced by copy(), operator+=(), and reset().