Uniform discrete distribution for random numbers. A discrete random distribution on the range with equal probability throughout the range.
The type of the parameters of the distribution.
The type of the range of the distribution.
Constructs a uniform distribution object.
Gets the inclusive lower bound of the distribution range.
Gets the inclusive upper bound of the distribution range.
Resets the distribution state.
Does nothing for the uniform integer distribution.
Gets a uniformly distributed random number in the range .
Gets a uniform random number in the range .
This function is aimed at use with std::random_shuffle.
Inserts a uniform_int random number distribution __x
into the output stream os
.
__os | An output stream. |
__x | A uniform_int random number distribution. |
__x
inserted or in an error state.Extracts a uniform_int random number distribution __x
from the input stream __is
.
__is | An input stream. |
__x | A uniform_int random number generator engine. |
__x
extracted or in an error state.A Bernoulli random number distribution.
Generates a sequence of true and false values with likelihood that true will come up and that false will appear.
Constructs a Bernoulli distribution with likelihood p
.
__p | [IN] The likelihood of a true result being returned. Must be in the interval . |
Gets the p
parameter of the distribution.
Resets the distribution state.
Does nothing for a Bernoulli distribution.
Gets the next value in the Bernoullian sequence.
Inserts a bernoulli_distribution random number distribution __x
into the output stream __os
.
__os | An output stream. |
__x | A bernoulli_distribution random number distribution. |
__x
inserted or in an error state.Extracts a bernoulli_distribution random number distribution __x
from the input stream __is
.
__is | An input stream. |
__x | A bernoulli_distribution random number generator engine. |
__x
extracted or in an error state.A discrete geometric random number distribution.
The formula for the geometric probability mass function is where is the parameter of the distribution.
Gets the distribution parameter p
.
Inserts a geometric_distribution random number distribution __x
into the output stream __os
.
__os | An output stream. |
__x | A geometric_distribution random number distribution. |
__x
inserted or in an error state.Extracts a geometric_distribution random number distribution __x
from the input stream __is
.
__is | An input stream. |
__x | A geometric_distribution random number generator engine. |
__x
extracted or in an error state.A discrete Poisson random number distribution.
The formula for the Poisson probability mass function is where is the parameter of the distribution.
Gets the distribution parameter mean
.
Inserts a poisson_distribution random number distribution __x
into the output stream __os
.
__os | An output stream. |
__x | A poisson_distribution random number distribution. |
__x
inserted or in an error state.Extracts a poisson_distribution random number distribution __x
from the input stream __is
.
__is | An input stream. |
__x | A poisson_distribution random number generator engine. |
__x
extracted or in an error state.A discrete binomial random number distribution.
The formula for the binomial probability mass function is where and are the parameters of the distribution.
Gets the distribution t
parameter.
Gets the distribution p
parameter.
Inserts a binomial_distribution random number distribution __x
into the output stream __os
.
__os | An output stream. |
__x | A binomial_distribution random number distribution. |
__x
inserted or in an error state.Extracts a binomial_distribution random number distribution __x
from the input stream __is
.
__is | An input stream. |
__x | A binomial_distribution random number generator engine. |
__x
extracted or in an error state.