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

#include <discrete_distribution.hpp>

Collaboration diagram for boost::random::detail::integer_alias_table< IntType, WeightType >:

Public Types

typedef std::vector< std::pair
< WeightType, IntType > > 
alias_table_t
 

Public Member Functions

WeightType get_weight (IntType bin) const
 
template<class Iter >
WeightType init_average (Iter begin, Iter end)
 
void init_empty ()
 
bool operator== (const integer_alias_table &other) const
 
template<class URNG >
WeightType test (URNG &urng) const
 
bool accept (IntType result, WeightType val) const
 

Static Public Member Functions

static WeightType normalize (WeightType val, WeightType average)
 
static void normalize (std::vector< WeightType > &)
 
static WeightType try_get_sum (const std::vector< WeightType > &weights)
 
template<class URNG >
static WeightType generate_in_range (URNG &urng, WeightType max)
 

Public Attributes

alias_table_t _alias_table
 
WeightType _average
 
IntType _excess
 

Member Typedef Documentation

template<class IntType , class WeightType >
typedef std::vector<std::pair<WeightType, IntType> > boost::random::detail::integer_alias_table< IntType, WeightType >::alias_table_t

Member Function Documentation

template<class IntType , class WeightType >
bool boost::random::detail::integer_alias_table< IntType, WeightType >::accept ( IntType  result,
WeightType  val 
) const
inline
template<class IntType , class WeightType >
template<class URNG >
static WeightType boost::random::detail::integer_alias_table< IntType, WeightType >::generate_in_range ( URNG &  urng,
WeightType  max 
)
inlinestatic
template<class IntType , class WeightType >
WeightType boost::random::detail::integer_alias_table< IntType, WeightType >::get_weight ( IntType  bin) const
inline
template<class IntType , class WeightType >
static WeightType boost::random::detail::integer_alias_table< IntType, WeightType >::normalize ( WeightType  val,
WeightType  average 
)
inlinestatic

References boost::phoenix::val().

template<class IntType , class WeightType >
static void boost::random::detail::integer_alias_table< IntType, WeightType >::normalize ( std::vector< WeightType > &  )
inlinestatic
template<class IntType , class WeightType >
template<class URNG >
WeightType boost::random::detail::integer_alias_table< IntType, WeightType >::test ( URNG &  urng) const
inline
template<class IntType , class WeightType >
static WeightType boost::random::detail::integer_alias_table< IntType, WeightType >::try_get_sum ( const std::vector< WeightType > &  weights)
inlinestatic

Member Data Documentation


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