The class template uniform_int_distribution models a . More...
#include <uniform_int_distribution.hpp>

Classes | |
| class | param_type | 
Public Types | |
| typedef IntType | input_type | 
| typedef IntType | result_type | 
Public Member Functions | |
| uniform_int_distribution (IntType min_arg=0, IntType max_arg=(std::numeric_limits< IntType >::max)()) | |
| Constructs a uniform_int_distribution.  More... | |
| uniform_int_distribution (const param_type &parm) | |
| Constructs a uniform_int_distribution from its parameters.  More... | |
| IntType min | BOOST_PREVENT_MACRO_SUBSTITUTION () const | 
| Returns the minimum value of the distribution.  More... | |
| IntType max | BOOST_PREVENT_MACRO_SUBSTITUTION () const | 
| Returns the maximum value of the distribution.  More... | |
| IntType | a () const | 
| Returns the minimum value of the distribution.  More... | |
| IntType | b () const | 
| Returns the maximum value of the distribution.  More... | |
| param_type | param () const | 
| Returns the parameters of the distribution.  More... | |
| void | param (const param_type &parm) | 
| Sets the parameters of the distribution.  More... | |
| void | reset () | 
| Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.  More... | |
| template<class Engine > | |
| result_type | operator() (Engine &eng) const | 
| Returns an integer uniformly distributed in the range [min, max].  More... | |
| template<class Engine > | |
| result_type | operator() (Engine &eng, const param_type &parm) const | 
| Returns an integer uniformly distributed in the range [param.a(), param.b()].  More... | |
| BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, uniform_int_distribution, ud) | |
Writes the distribution to a std::ostream.  More... | |
| BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, uniform_int_distribution, ud) | |
Reads the distribution from a std::istream.  More... | |
| BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (uniform_int_distribution, lhs, rhs) | |
| Returns true if the two distributions will produce identical sequences of values given equal generators.  More... | |
The class template uniform_int_distribution models a .
On each invocation, it returns a random integer value uniformly distributed in the set of integers {min, min+1, min+2, ..., max}.
The template parameter IntType shall denote an integer-like value type.
| typedef IntType boost::random::uniform_int_distribution< IntType >::input_type | 
| typedef IntType boost::random::uniform_int_distribution< IntType >::result_type | 
      
  | 
  inlineexplicit | 
Constructs a uniform_int_distribution.
min and max are the parameters of the distribution.
Requires: min <= max
References BOOST_ASSERT.
      
  | 
  inlineexplicit | 
Constructs a uniform_int_distribution from its parameters.
      
  | 
  inline | 
Returns the minimum value of the distribution.
Referenced by boost::uniform_int< IntType >::param().
      
  | 
  inline | 
Returns the maximum value of the distribution.
Referenced by boost::uniform_int< IntType >::param().
      
  | 
  inline | 
Returns the minimum value of the distribution.
      
  | 
  inline | 
Returns the maximum value of the distribution.
      
  | 
  inline | 
Returns true if the two distributions will produce identical sequences of values given equal generators.
      
  | 
  inline | 
Reads the distribution from a std::istream. 
      
  | 
  inline | 
Writes the distribution to a std::ostream. 
      
  | 
  inline | 
Returns an integer uniformly distributed in the range [min, max].
References boost::random::detail::generate_uniform_int().
      
  | 
  inline | 
Returns an integer uniformly distributed in the range [param.a(), param.b()].
References boost::random::uniform_int_distribution< IntType >::param_type::a(), boost::random::uniform_int_distribution< IntType >::param_type::b(), and boost::random::detail::generate_uniform_int().
      
  | 
  inline | 
Returns the parameters of the distribution.
References boost::random::uniform_int_distribution< IntType >::param_type::param_type().
Referenced by boost::uniform_int< IntType >::param().
      
  | 
  inline | 
Sets the parameters of the distribution.
References boost::random::uniform_int_distribution< IntType >::param_type::a(), and boost::random::uniform_int_distribution< IntType >::param_type::b().
      
  | 
  inline | 
Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.