|
GraphLab: Distributed Graph-Parallel API
2.1
|
Classes | |
| class | generator |
Functions | |
| void | destroy_tls_data (void *ptr) |
| generator & | get_source () |
| void | seed () |
| void | nondet_seed () |
| void | time_seed () |
| void | seed (const size_t seed_value) |
| void | pdf2cdf (std::vector< double > &pdf) |
| template<typename NumType > | |
| NumType | uniform (const NumType min, const NumType max) |
| template<typename NumType > | |
| NumType | fast_uniform (const NumType min, const NumType max) |
| double | rand01 () |
| int | rand () |
| double | gamma (const double alpha=double(1)) |
| double | gaussian (const double mean=double(0), const double stdev=double(1)) |
| double | normal (const double mean=double(0), const double stdev=double(1)) |
| bool | bernoulli (const double p=double(0.5)) |
| bool | fast_bernoulli (const double p=double(0.5)) |
| template<typename Double > | |
| size_t | multinomial (const std::vector< Double > &prb) |
| template<typename Double > | |
| size_t | multinomial_cdf (const std::vector< Double > &cdf) |
| template<typename T > | |
| std::vector< T > | permutation (const size_t nelems) |
| template<typename T > | |
| void | shuffle (std::vector< T > &vec) |
| template<typename Iterator > | |
| void | shuffle (Iterator begin, Iterator end) |
A collection of thread safe random number routines. Each thread is assigned its own generator however assigning a seed affects all current and future generators.
| void graphlab::random::destroy_tls_data | ( | void * | ptr | ) |
Pthread TLS code this function is responsible for destroying the random number generators
Definition at line 199 of file random.cpp.
| void graphlab::random::pdf2cdf | ( | std::vector< double > & | ) |
Converts a discrete PDF into a CDF
Definition at line 287 of file random.cpp.