yat
0.14.5pre
|
Random number distributions. More...
Classes | |
class | RNG |
Random Number Generator. More... | |
class | RNG_state |
Class holding state of a random generator. More... | |
class | Discrete |
Discrete random number distributions. More... | |
class | Binomial |
Binomial distribution. More... | |
class | DiscreteGeneral |
General. More... | |
class | DiscreteUniform |
Discrete uniform distribution. More... | |
class | Geometric |
Geomtric Distribution. More... | |
class | HyperGeometric |
class | NegativeHyperGeometric |
class | Poisson |
Poisson Distribution. More... | |
class | Continuous |
Continuous random number distributions. More... | |
class | ContinuousUniform |
Uniform distribution. More... | |
class | ContinuousGeneral |
Generates numbers from a histogram in a continuous manner. More... | |
class | Exponential |
Generator of random numbers from an exponential distribution. More... | |
class | Gaussian |
Gaussian distribution. More... | |
Functions | |
template<typename InputIterator , typename Size1 , typename Size2 , typename OutputIterator > | |
OutputIterator | copy_k_of_n (InputIterator it, Size1 k, Size2 n, OutputIterator out) |
template<typename RandomAccessIterator > | |
void | random_shuffle (RandomAccessIterator first, RandomAccessIterator last) |
Convenience function to shuffle a range with singleton RNG. More... | |
Random number distributions.
The yat random number related functionality is placed within the random namespace.
OutputIterator theplu::yat::random::copy_k_of_n | ( | InputIterator | it, |
Size1 | k, | ||
Size2 | n, | ||
OutputIterator | out | ||
) |
Copy k random element out of range [it, it+n) into output range [out, out+k).
Each element in the input range is copied with equal probability: k/n.
Type Requirements:
InputIterator
is Readable IteratorInputIterator
is Single Pass IteratorOutputIterator
is Writable IteratorOutputIterator
is Incrementable Iterator
out = *it is a valid expression if it is referencable.
void theplu::yat::random::random_shuffle | ( | RandomAccessIterator | first, |
RandomAccessIterator | last | ||
) |
Convenience function to shuffle a range with singleton RNG.
Wrapper around std::random_shuffle using DiscreteUniform as random generator and thereby using the underlying RNG class, which is singleton.
Type Requirements: