0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
Hypertable::DiscreteRandomGeneratorUniform Class Reference

Generate samples from Uniform distribution. More...

#include <DiscreteRandomGeneratorUniform.h>

Inheritance diagram for Hypertable::DiscreteRandomGeneratorUniform:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::DiscreteRandomGeneratorUniform:
Collaboration graph
[legend]

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...
 

Detailed Description

Generate samples from Uniform distribution.

Definition at line 40 of file DiscreteRandomGeneratorUniform.h.

Constructor & Destructor Documentation

Hypertable::DiscreteRandomGeneratorUniform::DiscreteRandomGeneratorUniform ( )
inline

Definition at line 42 of file DiscreteRandomGeneratorUniform.h.

Member Function Documentation

virtual uint64_t Hypertable::DiscreteRandomGeneratorUniform::get_sample ( )
inlinevirtual

Returns a random sample from the distribution.

Reimplemented from Hypertable::DiscreteRandomGenerator.

Definition at line 44 of file DiscreteRandomGeneratorUniform.h.


The documentation for this class was generated from the following file: