Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hypergeometric_distribution< int_t, fp_t > Class Template Reference

Detailed Description

template<typename int_t = int64_t, typename fp_t = double>
class thrill::common::hypergeometric_distribution< int_t, fp_t >

Definition at line 73 of file hypergeometric_distribution.hpp.

+ Inheritance diagram for hypergeometric_distribution< int_t, fp_t >:

#include <hypergeometric_distribution.hpp>

Public Types

using real_type = fp_t
 
using result_type = int_t
 

Public Member Functions

 hypergeometric_distribution (size_t seed=0)
 
int_t operator() (int_t good, int_t bad, int_t sample)
 
void seed (size_t seed_val)
 

Private Member Functions

fp_t loggam (fp_t x) const
 
int_t rk_hypergeometric (int_t good, int_t bad, int_t sample)
 
int_t rk_hypergeometric_hrua (int_t good, int_t bad, int_t sample)
 
int_t rk_hypergeometric_hyp (int_t good, int_t bad, int_t sample)
 

Private Attributes

std::uniform_real_distribution
< fp_t > 
dist
 
std::mt19937 rng
 

Static Private Attributes

static constexpr fp_t D1 = 1.7155277699214135
 
static constexpr fp_t D2 = 0.8989161620588988
 

Member Typedef Documentation

using real_type = fp_t

Definition at line 77 of file hypergeometric_distribution.hpp.

using result_type = int_t

Definition at line 76 of file hypergeometric_distribution.hpp.

Constructor & Destructor Documentation

hypergeometric_distribution ( size_t  seed = 0)
inline

Definition at line 79 of file hypergeometric_distribution.hpp.

Member Function Documentation

fp_t loggam ( fp_t  x) const
inlineprivate
int_t operator() ( int_t  good,
int_t  bad,
int_t  sample 
)
inline

Definition at line 83 of file hypergeometric_distribution.hpp.

int_t rk_hypergeometric ( int_t  good,
int_t  bad,
int_t  sample 
)
inlineprivate
int_t rk_hypergeometric_hrua ( int_t  good,
int_t  bad,
int_t  sample 
)
inlineprivate
int_t rk_hypergeometric_hyp ( int_t  good,
int_t  bad,
int_t  sample 
)
inlineprivate
void seed ( size_t  seed_val)
inline

Definition at line 96 of file hypergeometric_distribution.hpp.

Member Data Documentation

constexpr fp_t D1 = 1.7155277699214135
staticprivate
constexpr fp_t D2 = 0.8989161620588988
staticprivate
std::uniform_real_distribution<fp_t> dist
private

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