Awali
Another Weighted Automata library
|
#include <random.hh>
Public Member Functions | |
random_selector (const RandomGenerator &g=RandomGenerator()) | |
template<typename Container > | |
auto | operator() (const Container &c) -> decltype(*std::begin(c)) |
A randomly selected member of c. More... | |
template<typename Iter > | |
Iter | operator() (Iter start, Iter end) |
A randomly selected iterator in [start, end). More... | |
template<typename Container > | |
auto | pop (Container &c) -> typename Container::value_type |
A randomly selected member of c. Remove it from c. More... | |
template<typename Iter > | |
Iter | select (Iter start, Iter end) |
A randomly selected iterator in [start, end). More... | |
awali::sttc::internal::random_selector< RandomGenerator >::random_selector | ( | const RandomGenerator & | g = RandomGenerator() | ) |
auto awali::sttc::internal::random_selector< RandomGenerator >::operator() | ( | const Container & | c | ) | -> decltype(*std::begin(c)) |
A randomly selected member of c.
Iter awali::sttc::internal::random_selector< RandomGenerator >::operator() | ( | Iter | start, |
Iter | end | ||
) |
A randomly selected iterator in [start, end).
auto awali::sttc::internal::random_selector< RandomGenerator >::pop | ( | Container & | c | ) | -> typename Container::value_type |
A randomly selected member of c. Remove it from c.
Iter awali::sttc::internal::random_selector< RandomGenerator >::select | ( | Iter | start, |
Iter | end | ||
) |
A randomly selected iterator in [start, end).