vg
tools for working with variation graphs
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vg::uniform_int_distribution< T > Class Template Reference

#include <statistics.hpp>

Public Types

typedef T result_type
 

Public Member Functions

 uniform_int_distribution (T _a=0, T _b=numeric_limits< T >::max())
 
void reset ()
 
template<class Generator >
operator() (Generator &_g)
 
a () const
 
b () const
 

Protected Member Functions

template<class Generator >
generate_from_wide_generator (Generator &_g)
 

Protected Attributes

m_a
 
m_b
 

Detailed Description

template<typename T = int>
class vg::uniform_int_distribution< T >

This uniform_int_distribution implementation is based on the UniformRealDistribution from https://stackoverflow.com/a/34962942

Member Typedef Documentation

◆ result_type

template<typename T = int>
typedef T vg::uniform_int_distribution< T >::result_type

Constructor & Destructor Documentation

◆ uniform_int_distribution()

template<typename T = int>
vg::uniform_int_distribution< T >::uniform_int_distribution ( _a = 0,
_b = numeric_limits<T>::max() 
)
inline

Member Function Documentation

◆ a()

template<typename T = int>
T vg::uniform_int_distribution< T >::a ( ) const
inline

◆ b()

template<typename T = int>
T vg::uniform_int_distribution< T >::b ( ) const
inline

◆ generate_from_wide_generator()

template<typename T = int>
template<class Generator >
T vg::uniform_int_distribution< T >::generate_from_wide_generator ( Generator &  _g)
inlineprotected

Generate a result when we know the generator will produce a result on a range as big as or bigger than ours.

◆ operator()()

template<typename T = int>
template<class Generator >
T vg::uniform_int_distribution< T >::operator() ( Generator &  _g)
inline

◆ reset()

template<typename T = int>
void vg::uniform_int_distribution< T >::reset ( )
inline

Member Data Documentation

◆ m_a

template<typename T = int>
T vg::uniform_int_distribution< T >::m_a
protected

◆ m_b

template<typename T = int>
T vg::uniform_int_distribution< T >::m_b
protected

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