Generate samples from Uniform distribution. More...
#include <DiscreteRandomGeneratorUniform.h>
Public Member Functions | |
DiscreteRandomGeneratorUniform () | |
virtual uint64_t | get_sample () |
Returns a random sample from the distribution. More... | |
Public Member Functions inherited from Hypertable::DiscreteRandomGenerator | |
DiscreteRandomGenerator () | |
Default constructor; sets up a random number generator with a constant seed value of 1. More... | |
virtual | ~DiscreteRandomGenerator () |
Destructor - cleans up allocated resources. More... | |
void | set_seed (uint32_t s) |
Sets the seed for the random number generator. More... | |
void | set_value_count (uint64_t value_count) |
Sets the size of the generated range. More... | |
void | set_pool_min (uint64_t pool_min) |
Sets the lowest value of the desired distribution. More... | |
void | set_pool_max (uint64_t pool_max) |
Sets the highest value of the desired distribution. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Hypertable::DiscreteRandomGenerator | |
virtual void | generate_cmf () |
Generate the cumulative mass function for the distribution. More... | |
virtual double | pmf (uint64_t val) |
Returns the probability of drawing a specific value from the distribution. More... | |
Protected Attributes inherited from Hypertable::DiscreteRandomGenerator | |
std::mt19937 | m_random_engine {1} |
The random number generator. More... | |
uint64_t | m_value_count {} |
Number of values in the range. More... | |
uint64_t | m_pool_min {} |
Lower bound of the range. More... | |
uint64_t | m_pool_max {} |
Upper bound of the range. More... | |
uint64_t * | m_numbers {} |
Array with the random samples. More... | |
double * | m_cmf {} |
The cumulative mass of the distribution. More... | |
Generate samples from Uniform distribution.
Definition at line 40 of file DiscreteRandomGeneratorUniform.h.
|
inline |
Definition at line 42 of file DiscreteRandomGeneratorUniform.h.
|
inlinevirtual |
Returns a random sample from the distribution.
Reimplemented from Hypertable::DiscreteRandomGenerator.
Definition at line 44 of file DiscreteRandomGeneratorUniform.h.