![]() |
Vcsn
2.1
Be Rational
|
#include <random.hh>
Public Member Functions | |
random_selector (const RandomGenerator &g=RandomGenerator()) | |
template<typename Iter > | |
Iter | select (Iter start, Iter end) |
A randomly selected iterator in [start, end). More... | |
template<typename Iter > | |
Iter | operator() (Iter start, Iter end) |
A randomly selected iterator in [start, end). More... | |
template<typename Container > | |
auto | operator() (const Container &c) -> decltype(*std::begin(c)) |
A randomly selected member of c. More... | |
template<typename Container > | |
auto | pop (Container &c) -> typename Container::value_type |
A randomly selected member of c. Remove it from c. More... | |
Private Attributes | |
RandomGenerator | gen_ |
|
inline |
|
inline |
A randomly selected iterator in [start, end).
Definition at line 30 of file random.hh.
References vcsn::random_selector< RandomGenerator >::select().
|
inline |
A randomly selected member of c.
Definition at line 37 of file random.hh.
References vcsn::random_selector< RandomGenerator >::select().
|
inline |
A randomly selected member of c. Remove it from c.
Definition at line 44 of file random.hh.
References vcsn::random_selector< RandomGenerator >::select().
Referenced by vcsn::random_automaton().
|
inline |
A randomly selected iterator in [start, end).
Definition at line 21 of file random.hh.
References vcsn::random_selector< RandomGenerator >::gen_.
Referenced by vcsn::random_selector< RandomGenerator >::operator()(), and vcsn::random_selector< RandomGenerator >::pop().
|
private |
Definition at line 53 of file random.hh.
Referenced by vcsn::random_selector< RandomGenerator >::select().