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::real_alias_table< IntType, WeightType > Struct Template Reference

#include <discrete_distribution.hpp>

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

Public Types

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

Public Member Functions

WeightType get_weight (IntType) const
 
template<class Iter >
WeightType init_average (Iter first, Iter last)
 
void init_empty ()
 
bool operator== (const real_alias_table &other) const
 
template<class URNG >
WeightType test (URNG &urng) const
 
bool accept (IntType, WeightType) const
 

Static Public Member Functions

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

Public Attributes

alias_table_t _alias_table
 

Member Typedef Documentation

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

Member Function Documentation

template<class IntType , class WeightType >
bool boost::random::detail::real_alias_table< IntType, WeightType >::accept ( IntType  ,
WeightType   
) const
inline
template<class IntType , class WeightType >
template<class URNG >
static WeightType boost::random::detail::real_alias_table< IntType, WeightType >::generate_in_range ( URNG &  urng,
WeightType   
)
inlinestatic
template<class IntType , class WeightType >
WeightType boost::random::detail::real_alias_table< IntType, WeightType >::get_weight ( IntType  ) const
inline
template<class IntType , class WeightType >
template<class Iter >
WeightType boost::random::detail::real_alias_table< IntType, WeightType >::init_average ( Iter  first,
Iter  last 
)
inline
template<class IntType , class WeightType >
void boost::random::detail::real_alias_table< IntType, WeightType >::init_empty ( )
inline
template<class IntType , class WeightType >
static WeightType boost::random::detail::real_alias_table< IntType, WeightType >::normalize ( WeightType  val,
WeightType  average 
)
inlinestatic
template<class IntType , class WeightType >
static void boost::random::detail::real_alias_table< IntType, WeightType >::normalize ( std::vector< WeightType > &  weights)
inlinestatic
template<class IntType , class WeightType >
bool boost::random::detail::real_alias_table< IntType, WeightType >::operator== ( const real_alias_table< IntType, WeightType > &  other) const
inline
template<class IntType , class WeightType >
template<class URNG >
WeightType boost::random::detail::real_alias_table< IntType, WeightType >::test ( URNG &  urng) const
inline
template<class IntType , class WeightType >
static WeightType boost::random::detail::real_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: