Vcsn
2.4
Be Rational
|
Random selector on container, using discrete distribution. More...
#include <random.hh>
Public Member Functions | |
discrete_chooser (RandomGenerator &g) | |
template<typename Container_w , typename Container > | |
Container::iterator | select (Container_w weight, Container cont) const |
template<typename Container_w , typename Container > | |
Container::iterator | operator() (Container_w weight, Container cont) const |
Private Attributes | |
RandomGenerator & | gen_ |
Random selector on container, using discrete distribution.
|
inline |
|
inline |
Definition at line 44 of file random.hh.
References vcsn::discrete_chooser< RandomGenerator >::select().
|
inline |
Definition at line 35 of file random.hh.
References vcsn::discrete_chooser< RandomGenerator >::gen_, and vcsn::res.
Referenced by vcsn::discrete_chooser< RandomGenerator >::operator()().
|
private |
Definition at line 50 of file random.hh.
Referenced by vcsn::discrete_chooser< RandomGenerator >::select().