Thrill  0.1
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

◆ real_type

using real_type = fp_t

Definition at line 77 of file hypergeometric_distribution.hpp.

◆ result_type

using result_type = int_t

Definition at line 76 of file hypergeometric_distribution.hpp.

Constructor & Destructor Documentation

◆ hypergeometric_distribution()

hypergeometric_distribution ( size_t  seed = 0)
inline

Definition at line 79 of file hypergeometric_distribution.hpp.

Member Function Documentation

◆ loggam()

fp_t loggam ( fp_t  x) const
inlineprivate

◆ operator()()

int_t operator() ( int_t  good,
int_t  bad,
int_t  sample 
)
inline

Definition at line 83 of file hypergeometric_distribution.hpp.

◆ rk_hypergeometric()

int_t rk_hypergeometric ( int_t  good,
int_t  bad,
int_t  sample 
)
inlineprivate

◆ rk_hypergeometric_hrua()

int_t rk_hypergeometric_hrua ( int_t  good,
int_t  bad,
int_t  sample 
)
inlineprivate

◆ rk_hypergeometric_hyp()

int_t rk_hypergeometric_hyp ( int_t  good,
int_t  bad,
int_t  sample 
)
inlineprivate

◆ seed()

void seed ( size_t  seed_val)
inline

Member Data Documentation

◆ D1

constexpr fp_t D1 = 1.7155277699214135
staticprivate

Definition at line 150 of file hypergeometric_distribution.hpp.

◆ D2

constexpr fp_t D2 = 0.8989161620588988
staticprivate

◆ dist

std::uniform_real_distribution<fp_t> dist
private

◆ rng


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