Generates samples from a discrete probability distribution in the range [0, max_val] by transforming a uniform [0, 1] distribution into the desired distribution.  
 More...
#include <DiscreteRandomGenerator.h>
|  | 
| 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... 
 | 
|  | 
Generates samples from a discrete probability distribution in the range [0, max_val] by transforming a uniform [0, 1] distribution into the desired distribution. 
Definition at line 45 of file DiscreteRandomGenerator.h.
  
  | 
        
          | Hypertable::DiscreteRandomGenerator::DiscreteRandomGenerator | ( |  | ) |  |  | inline | 
 
Default constructor; sets up a random number generator with a constant seed value of 1. 
Definition at line 50 of file DiscreteRandomGenerator.h.
 
 
  
  | 
        
          | virtual Hypertable::DiscreteRandomGenerator::~DiscreteRandomGenerator | ( |  | ) |  |  | inlinevirtual | 
 
 
  
  | 
        
          | void DiscreteRandomGenerator::generate_cmf | ( |  | ) |  |  | protectedvirtual | 
 
 
  
  | 
        
          | uint64_t DiscreteRandomGenerator::get_sample | ( |  | ) |  |  | virtual | 
 
 
  
  | 
        
          | virtual double Hypertable::DiscreteRandomGenerator::pmf | ( | uint64_t | val | ) |  |  | inlineprotectedvirtual | 
 
 
  
  | 
        
          | void Hypertable::DiscreteRandomGenerator::set_pool_max | ( | uint64_t | pool_max | ) |  |  | inline | 
 
Sets the highest value of the desired distribution. 
- Parameters
- 
  
    | pool_max | The upper bound of the range |  
 
Definition at line 91 of file DiscreteRandomGenerator.h.
 
 
  
  | 
        
          | void Hypertable::DiscreteRandomGenerator::set_pool_min | ( | uint64_t | pool_min | ) |  |  | inline | 
 
Sets the lowest value of the desired distribution. 
- Parameters
- 
  
    | pool_min | The lower bound of the range |  
 
Definition at line 79 of file DiscreteRandomGenerator.h.
 
 
  
  | 
        
          | void Hypertable::DiscreteRandomGenerator::set_seed | ( | uint32_t | s | ) |  |  | inline | 
 
Sets the seed for the random number generator. 
- Parameters
- 
  
    | s | The seed value for the random number generator |  
 
Definition at line 59 of file DiscreteRandomGenerator.h.
 
 
  
  | 
        
          | void Hypertable::DiscreteRandomGenerator::set_value_count | ( | uint64_t | value_count | ) |  |  | inline | 
 
Sets the size of the generated range. 
- Parameters
- 
  
    | value_count | The number of values in the range |  
 
Definition at line 67 of file DiscreteRandomGenerator.h.
 
 
  
  | 
        
          | double* Hypertable::DiscreteRandomGenerator::m_cmf {} |  | protected | 
 
 
  
  | 
        
          | uint64_t* Hypertable::DiscreteRandomGenerator::m_numbers {} |  | protected | 
 
 
  
  | 
        
          | uint64_t Hypertable::DiscreteRandomGenerator::m_pool_max {} |  | protected | 
 
 
  
  | 
        
          | uint64_t Hypertable::DiscreteRandomGenerator::m_pool_min {} |  | protected | 
 
 
  
  | 
        
          | std::mt19937 Hypertable::DiscreteRandomGenerator::m_random_engine {1} |  | protected | 
 
 
  
  | 
        
          | uint64_t Hypertable::DiscreteRandomGenerator::m_value_count {} |  | protected | 
 
 
The documentation for this class was generated from the following files: