Vcsn  2.3
Be Rational
vcsn::discrete_chooser< RandomGenerator > Struct Template Reference

Random selector on container, using discrete distribution. More...

#include <random.hh>

Collaboration diagram for vcsn::discrete_chooser< RandomGenerator >:

Public Member Functions

 discrete_chooser (RandomGenerator &g)
 
template<typename Iter_weight , typename Iter >
Iter select (Iter_weight start_w, Iter_weight end_w, Iter start)
 
template<typename Iter_weight , typename Iter >
Iter operator() (Iter_weight start_w, Iter_weight end_w, Iter start)
 

Private Attributes

RandomGenerator & gen_
 

Detailed Description

template<typename RandomGenerator>
struct vcsn::discrete_chooser< RandomGenerator >

Random selector on container, using discrete distribution.

Definition at line 15 of file random.hh.

Constructor & Destructor Documentation

template<typename RandomGenerator >
vcsn::discrete_chooser< RandomGenerator >::discrete_chooser ( RandomGenerator &  g)
inline

Definition at line 17 of file random.hh.

Member Function Documentation

template<typename RandomGenerator >
template<typename Iter_weight , typename Iter >
Iter vcsn::discrete_chooser< RandomGenerator >::operator() ( Iter_weight  start_w,
Iter_weight  end_w,
Iter  start 
)
inline

Definition at line 30 of file random.hh.

References vcsn::discrete_chooser< RandomGenerator >::select().

Here is the call graph for this function:

template<typename RandomGenerator >
template<typename Iter_weight , typename Iter >
Iter vcsn::discrete_chooser< RandomGenerator >::select ( Iter_weight  start_w,
Iter_weight  end_w,
Iter  start 
)
inline

Member Data Documentation

template<typename RandomGenerator >
RandomGenerator& vcsn::discrete_chooser< RandomGenerator >::gen_
private

Definition at line 36 of file random.hh.

Referenced by vcsn::discrete_chooser< RandomGenerator >::select().


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