queso-0.57.1
|
A templated class for a finite distribution. More...
#include <FiniteDistribution.h>
Public Member Functions | |
Constructor/Destructor methods | |
FiniteDistribution (const BaseEnvironment &env, const char *prefix, const std::vector< double > &inpWeights) | |
Constructor. More... | |
virtual | ~FiniteDistribution () |
Virtual destructor. More... | |
Misc methods | |
const BaseEnvironment & | env () const |
Environment; access to protected attribute m_env. More... | |
Statistical methods | |
const std::vector< double > & | weights () const |
Weights. More... | |
unsigned int | sample () const |
Samples. More... | |
Protected Attributes | |
const BaseEnvironment & | m_env |
std::string | m_prefix |
std::vector< double > | m_weights |
std::map< double, unsigned int > | m_map |
A templated class for a finite distribution.
Unordered, discrete distribution, whose weights must be nonnegative, and are treated as unnormalized probabilities.
TODO: Describe me better!
Definition at line 45 of file FiniteDistribution.h.
QUESO::FiniteDistribution::FiniteDistribution | ( | const BaseEnvironment & | env, |
const char * | prefix, | ||
const std::vector< double > & | inpWeights | ||
) |
Constructor.
Definition at line 31 of file FiniteDistribution.C.
References QUESO::BaseEnvironment::displayVerbosity(), m_env, m_map, m_prefix, m_weights, QUESO::queso_require_equal_to_msg, and QUESO::BaseEnvironment::subDisplayFile().
|
virtual |
Virtual destructor.
Definition at line 116 of file FiniteDistribution.C.
References m_map, and m_weights.
const BaseEnvironment & QUESO::FiniteDistribution::env | ( | ) | const |
Environment; access to protected attribute m_env.
Definition at line 125 of file FiniteDistribution.C.
References m_env.
unsigned int QUESO::FiniteDistribution::sample | ( | ) | const |
Samples.
Definition at line 141 of file FiniteDistribution.C.
References m_env, m_map, QUESO::BaseEnvironment::rngObject(), and QUESO::RngBase::uniformSample().
Referenced by QUESO::MLSampling< P_V, P_M >::sampleIndexes_proc0().
const std::vector< double > & QUESO::FiniteDistribution::weights | ( | ) | const |
Weights.
Definition at line 133 of file FiniteDistribution.C.
References m_weights.
|
protected |
Definition at line 73 of file FiniteDistribution.h.
Referenced by env(), FiniteDistribution(), and sample().
|
protected |
Definition at line 77 of file FiniteDistribution.h.
Referenced by FiniteDistribution(), sample(), and ~FiniteDistribution().
|
protected |
Definition at line 74 of file FiniteDistribution.h.
Referenced by FiniteDistribution().
|
protected |
Definition at line 75 of file FiniteDistribution.h.
Referenced by FiniteDistribution(), weights(), and ~FiniteDistribution().