1 #ifndef SAMPLING_SELECTOR_H 2 #define SAMPLING_SELECTOR_H 6 #include "iselection_strategy.hpp" 16 template <
typename Context,
typename Config>
21 typedef std::uniform_int_distribution<> DistributionType;
31 DistributionType dist(0, node->
children().size() - 1);
32 int rand = dist(*node->
config()->nb_gen());
node_t * select(node_t *node)
randomly chooses a child of node
selector that chooses random children uniformly
interface for all selection strategies. A selection strategy selects one child of a parent node accor...
basic interface for a node in the tree. Every node has to implement this functions.
virtual Config * config() const =0
gets the config object
virtual const vector< node_t * > children() const =0
get the children of the current node