0.12.0
Freundlich's C++ toolkit
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Public Attributes
fcppt::random::distribution::uniform_int< IntType > Class Template Reference

Detailed Description

template<typename IntType>
class fcppt::random::distribution::uniform_int< IntType >

A wrapper around a uniform int distribution.

Wraps a uniform int distribution, removing the default parameters of the constructor and also using strong typedefs.

Template Parameters
IntTypeMust be an integer type

Public Types

typedef IntType int_type
 The int type used.
 
typedef wrapped::result_type result_type
 The result returned by drawing random numbers.
 
typedef int_type min
 
typedef int_type max
 

Public Member Functions

 FCPPT_STATIC_ASSERT_STATEMENT (boost::is_integral< int_type >::value)
 
 uniform_int (min _min, max _max)
 Constructs a uniform int distribution.
 

Public Attributes

 FCPPT_RANDOM_DISTRIBUTION_DECLARE_CALL
 

Member Typedef Documentation

template<typename IntType >
typedef IntType fcppt::random::distribution::uniform_int< IntType >::int_type

The int type used.

template<typename IntType >
typedef int_type fcppt::random::distribution::uniform_int< IntType >::max
template<typename IntType >
typedef int_type fcppt::random::distribution::uniform_int< IntType >::min
template<typename IntType >
typedef wrapped::result_type fcppt::random::distribution::uniform_int< IntType >::result_type

The result returned by drawing random numbers.

Constructor & Destructor Documentation

template<typename IntType >
fcppt::random::distribution::uniform_int< IntType >::uniform_int ( min  _min,
max  _max 
)

Constructs a uniform int distribution.

Constructs the uniform int distribution from _min and _max.

Parameters
_minThe minimum value this distribution can produce
_maxThe maximum value this distribution can produce

Member Function Documentation

template<typename IntType >
fcppt::random::distribution::uniform_int< IntType >::FCPPT_STATIC_ASSERT_STATEMENT ( boost::is_integral< int_type >::value  )

Member Data Documentation

template<typename IntType >
fcppt::random::distribution::uniform_int< IntType >::FCPPT_RANDOM_DISTRIBUTION_DECLARE_CALL