MCKL
Monte Carlo Kernel Library
Classes | Public Types | Public Member Functions | Friends | List of all members
mckl::UniformIntDistribution< IntType > Class Template Reference

Uniform integer distribution. More...

#include <mckl/random/internal/common.hpp>

Classes

class  param_type
 

Public Types

using distribution_type = UniformIntDistribution< IntType >
 
using result_type = IntType
 

Public Member Functions

 UniformIntDistribution (result_type a=0, result_type b=std::numeric_limits< result_type >::max())
 
 UniformIntDistribution (const param_type &param)
 
 UniformIntDistribution (param_type &&param)
 
result_type a () const
 
result_type b () const
 
result_type max () const
 
result_type min () const
 
template<typename RNGType >
result_type operator() (RNGType &rng)
 
template<typename RNGType >
void operator() (RNGType &rng, std::size_t n, result_type *r, const param_type &param)
 
template<typename RNGType >
result_type operator() (RNGType &rng, const param_type &param)
 
template<typename RNGType >
void operator() (RNGType &rng, std::size_t n, result_type *r)
 
void param (param_type &&param)
 
const param_typeparam () const
 
void param (const param_type &param)
 
void reset ()
 

Friends

bool operator!= (const distribution_type &dist1, const distribution_type &dist2)
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const distribution_type &dist)
 
bool operator== (const distribution_type &dist1, const distribution_type &dist2)
 
template<typename CharT , typename Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, distribution_type &dist)
 

Detailed Description

template<typename IntType>
class mckl::UniformIntDistribution< IntType >

Uniform integer distribution.

Definition at line 1108 of file random/internal/common.hpp.

Member Typedef Documentation

◆ distribution_type

template<typename IntType >
using mckl::UniformIntDistribution< IntType >::distribution_type = UniformIntDistribution< IntType >

Definition at line 140 of file uniform_int_distribution.hpp.

◆ result_type

template<typename IntType >
using mckl::UniformIntDistribution< IntType >::result_type = IntType

Definition at line 140 of file uniform_int_distribution.hpp.

Constructor & Destructor Documentation

◆ UniformIntDistribution() [1/3]

template<typename IntType >
mckl::UniformIntDistribution< IntType >::UniformIntDistribution ( result_type  a = 0,
result_type  b = std::numeric_limits<result_type>::max() 
)
inlineexplicit

Definition at line 140 of file uniform_int_distribution.hpp.

◆ UniformIntDistribution() [2/3]

template<typename IntType >
mckl::UniformIntDistribution< IntType >::UniformIntDistribution ( const param_type param)
inlineexplicit

Definition at line 140 of file uniform_int_distribution.hpp.

◆ UniformIntDistribution() [3/3]

template<typename IntType >
mckl::UniformIntDistribution< IntType >::UniformIntDistribution ( param_type &&  param)
inlineexplicit

Definition at line 140 of file uniform_int_distribution.hpp.

Member Function Documentation

◆ a()

template<typename IntType >
result_type mckl::UniformIntDistribution< IntType >::a ( ) const
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ b()

template<typename IntType >
result_type mckl::UniformIntDistribution< IntType >::b ( ) const
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ max()

template<typename IntType >
result_type mckl::UniformIntDistribution< IntType >::max ( ) const
inline

Definition at line 146 of file uniform_int_distribution.hpp.

◆ min()

template<typename IntType >
result_type mckl::UniformIntDistribution< IntType >::min ( ) const
inline

Definition at line 144 of file uniform_int_distribution.hpp.

◆ operator()() [1/4]

template<typename IntType >
template<typename RNGType >
void mckl::UniformIntDistribution< IntType >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r 
)
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ operator()() [2/4]

template<typename IntType >
template<typename RNGType >
void mckl::UniformIntDistribution< IntType >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r,
const param_type param 
)
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ operator()() [3/4]

template<typename IntType >
template<typename RNGType >
result_type mckl::UniformIntDistribution< IntType >::operator() ( RNGType &  rng,
const param_type param 
)
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ operator()() [4/4]

template<typename IntType >
template<typename RNGType >
result_type mckl::UniformIntDistribution< IntType >::operator() ( RNGType &  rng)
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ param() [1/3]

template<typename IntType >
void mckl::UniformIntDistribution< IntType >::param ( param_type &&  param)
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ param() [2/3]

template<typename IntType >
void mckl::UniformIntDistribution< IntType >::param ( const param_type param)
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ param() [3/3]

template<typename IntType >
const param_type& mckl::UniformIntDistribution< IntType >::param ( ) const
inline

Definition at line 140 of file uniform_int_distribution.hpp.

◆ reset()

template<typename IntType >
void mckl::UniformIntDistribution< IntType >::reset ( )
inline

Definition at line 148 of file uniform_int_distribution.hpp.

Friends And Related Function Documentation

◆ operator!=

template<typename IntType >
bool operator!= ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 140 of file uniform_int_distribution.hpp.

◆ operator<<

template<typename IntType >
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< ( std::basic_ostream< CharT, Traits > &  os,
const distribution_type dist 
)
friend

Definition at line 140 of file uniform_int_distribution.hpp.

◆ operator==

template<typename IntType >
bool operator== ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 140 of file uniform_int_distribution.hpp.

◆ operator>>

template<typename IntType >
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> ( std::basic_istream< CharT, Traits > &  is,
distribution_type dist 
)
friend

Definition at line 140 of file uniform_int_distribution.hpp.