4.4.1
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
fcppt::random::distribution::parameters::uniform_int< IntType, Distribution > Class Template Reference

Detailed Description

template<typename IntType, typename Distribution>
class fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >

Parameters class for uniform int distributions.

This class can be used as fcppt::random::distribution::basic's template parameter and is also used to initialize an object of it. It uses strong typedefs for the min and max parameters.

Public Types

using result_type = IntType
 
using base_type = fcppt::random::distribution::base_type< result_type >
 
using distribution = typename Distribution::template apply< base_type >::type
 
using wrapped_param_type = typename distribution::param_type
 
using min = fcppt::strong_typedef< IntType,_ >
 
using max = fcppt::strong_typedef< IntType,_ >
 

Public Member Functions

 uniform_int (min _min, max _max)
 Constructs parameters for a uniform int distribution.
 
wrapped_param_type convert_from () const
 

Static Public Member Functions

static uniform_int convert_to (distribution const &)
 

Member Typedef Documentation

◆ base_type

template<typename IntType , typename Distribution >
using fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::base_type = fcppt::random::distribution::base_type<result_type>

◆ distribution

template<typename IntType , typename Distribution >
using fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::distribution = typename Distribution::template apply<base_type>::type

◆ max

template<typename IntType , typename Distribution >
using fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::max = fcppt::strong_typedef< IntType ,_>

◆ min

template<typename IntType , typename Distribution >
using fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::min = fcppt::strong_typedef< IntType ,_>

◆ result_type

template<typename IntType , typename Distribution >
using fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::result_type = IntType

◆ wrapped_param_type

template<typename IntType , typename Distribution >
using fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::wrapped_param_type = typename distribution::param_type

Constructor & Destructor Documentation

◆ uniform_int()

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

Constructs parameters for a uniform int distribution.

Constructs parameters for a uniform int distribution that can produce values from _min to (including) _max

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

Member Function Documentation

◆ convert_from()

template<typename IntType , typename Distribution >
wrapped_param_type fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::convert_from ( ) const

◆ convert_to()

template<typename IntType , typename Distribution >
static uniform_int fcppt::random::distribution::parameters::uniform_int< IntType, Distribution >::convert_to ( distribution const &  )
static