Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::random::random_number_generator< URNG, IntType > Class Template Reference

Instantiations of class template random_number_generator model a RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]). More...

#include <random_number_generator.hpp>

Public Types

typedef URNG base_type
 
typedef IntType argument_type
 
typedef IntType result_type
 

Public Member Functions

 random_number_generator (base_type &rng)
 Constructs a random_number_generator functor with the given as the underlying source of random numbers. More...
 
result_type operator() (argument_type n)
 Returns a value in the range [0, n) More...
 

Detailed Description

template<class URNG, class IntType = long>
class boost::random::random_number_generator< URNG, IntType >

Instantiations of class template random_number_generator model a RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]).

On each invocation, it returns a uniformly distributed integer in the range [0..n).

The template parameter IntType shall denote some integer-like value type.

Member Typedef Documentation

template<class URNG , class IntType = long>
typedef IntType boost::random::random_number_generator< URNG, IntType >::argument_type
template<class URNG , class IntType = long>
typedef URNG boost::random::random_number_generator< URNG, IntType >::base_type
template<class URNG , class IntType = long>
typedef IntType boost::random::random_number_generator< URNG, IntType >::result_type

Constructor & Destructor Documentation

template<class URNG , class IntType = long>
boost::random::random_number_generator< URNG, IntType >::random_number_generator ( base_type rng)
inline

Constructs a random_number_generator functor with the given as the underlying source of random numbers.

Member Function Documentation

template<class URNG , class IntType = long>
result_type boost::random::random_number_generator< URNG, IntType >::operator() ( argument_type  n)
inline

Returns a value in the range [0, n)

References BOOST_ASSERT.


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