queso-0.53.0
|
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 30 of file FiniteDistribution.C.
References QUESO::BaseEnvironment::displayVerbosity(), m_env, m_map, m_prefix, m_weights, queso_deprecated, queso_require_equal_to_msg, queso_require_less_equal_msg, and QUESO::BaseEnvironment::subDisplayFile().
|
virtual |
Virtual destructor.
Definition at line 115 of file FiniteDistribution.C.
References m_map, m_weights, and queso_deprecated.
const BaseEnvironment & QUESO::FiniteDistribution::env | ( | ) | const |
Environment; access to protected attribute m_env.
Definition at line 124 of file FiniteDistribution.C.
References m_env, and queso_deprecated.
unsigned int QUESO::FiniteDistribution::sample | ( | ) | const |
Samples.
Definition at line 140 of file FiniteDistribution.C.
References m_env, m_map, queso_deprecated, queso_require_less_msg, queso_require_msg, 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 132 of file FiniteDistribution.C.
References m_weights, and queso_deprecated.
|
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().