Skip to main content

UniformInteger

Uniformly samples integer random values on the interval between a (with default value 0) and b (with default value max_integer()) (inclusive).

The probability mass function is given by,

P(xa,b)=1ba+1.P(x | a, b) = \frac{1}{b - a + 1}.

Constructors

UniformInteger(const UniformInteger distribution) -> UniformInteger

Copy constructor for UniformInteger distribution.

Parameters

Symbols

NameDescription
=Copy assignment operator for UniformInteger distribution.

Members

NameDescription
aInclusive lower bound.
bInclusive upper bound.
maxReturns the maximum possible value from the distribution
minReturns the minimum possible value from the distribution
sampleSample from distribution.