Namespaces
Variants
Views
Actions

std::uniform_int_distribution::uniform_int_distribution

From cppreference.com
< cpp‎ | numeric‎ | random‎ | uniform int distribution
Revision as of 09:15, 3 July 2013 by P12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
 
 
explicit uniform_int_distribution( IntType a = 0,
                                   IntType b = std::numeric_limits<IntType>::max() );
(1) (since C++11)
explicit uniform_int_distribution( const param_type& params );
(2) (since C++11)

Constructs new distribution object. The first version uses a and b as the distribution parameters, the second version uses params as the distribution parameters.

The behavior is undefined if a>b.

[edit] Parameters

a - the a distribution parameter (minimum value)
b - the b distribution parameter (maximum value)
params - the distribution parameter set