libstdc++: std::uniform_int_distribution< _IntType > Class Template Reference (original) (raw)

#include <[random](a00167%5Fsource.html)>

Public Member Functions
uniform_int_distribution ()
uniform_int_distribution (_IntType __a, _IntType __b=__gnu_cxx::__int_traits< _IntType >::__max)
uniform_int_distribution (const param_type &__p)
template<typename _ForwardIterator , typename _UniformRandomBitGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomBitGenerator &__urng)
template<typename _ForwardIterator , typename _UniformRandomBitGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomBitGenerator &__urng, const param_type &__p)
template<typename _UniformRandomBitGenerator >
void __generate (result_type *__f, result_type *__t, _UniformRandomBitGenerator &__urng, const param_type &__p)
result_type a () const
result_type b () const
result_type max () const
result_type min () const
template<typename _UniformRandomBitGenerator >
result_type operator() (_UniformRandomBitGenerator &__urng)
template<typename _UniformRandomBitGenerator >
result_type operator() (_UniformRandomBitGenerator &__urng, const param_type &__p)
param_type param () const
void param (const param_type &__param)
void reset ()

template<typename _IntType = int>
class std::uniform_int_distribution< _IntType >

Uniform discrete distribution for random numbers. A discrete random distribution on the range $[min, max]$ with equal probability throughout the range.

Since

C++11

Definition at line 88 of file uniform_int_dist.h.

result_type

template<typename _IntType = int>

template<typename _IntType = int>

uniform_int_distribution() [2/3]

template<typename _IntType = int>

uniform_int_distribution() [3/3]

template<typename _IntType = int>

__generate() [1/3]

template<typename _IntType = int>

template<typename _ForwardIterator , typename _UniformRandomBitGenerator >

void std::uniform_int_distribution< _IntType >::__generate ( _ForwardIterator __f, _ForwardIterator __t, _UniformRandomBitGenerator & __urng ) inline

__generate() [2/3]

template<typename _IntType = int>

template<typename _ForwardIterator , typename _UniformRandomBitGenerator >

__generate() [3/3]

template<typename _IntType = int>

template<typename _UniformRandomBitGenerator >

a()

template<typename _IntType = int>

b()

template<typename _IntType = int>

max()

template<typename _IntType = int>

Returns the inclusive upper bound of the distribution range.

Definition at line 195 of file uniform_int_dist.h.

min()

template<typename _IntType = int>

Returns the inclusive lower bound of the distribution range.

Definition at line 188 of file uniform_int_dist.h.

operator()() [1/2]

template<typename _IntType = int>

template<typename _UniformRandomBitGenerator >

operator()() [2/2]

param() [1/2]

template<typename _IntType = int>

param() [2/2]

template<typename _IntType = int>

Sets the parameter set of the distribution.

Parameters

__param The new parameter set of the distribution.

Definition at line 181 of file uniform_int_dist.h.

reset()

template<typename _IntType = int>

Resets the distribution state.

Does nothing for the uniform integer distribution.

Definition at line 159 of file uniform_int_dist.h.

operator==

template<typename _IntType = int>

Return true if two uniform integer distributions have the same parameters.

Definition at line 238 of file uniform_int_dist.h.


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