1#include "probfd/successor_samplers/random_successor_sampler.h"
3#include "downward/utils/rng.h"
7template <
typename Action>
8RandomSuccessorSampler<Action>::RandomSuccessorSampler(
int random_seed)
9 : rng_(
std::make_shared<utils::RandomNumberGenerator>(random_seed))
13template <
typename Action>
14RandomSuccessorSampler<Action>::RandomSuccessorSampler(
15 std::shared_ptr<utils::RandomNumberGenerator> rng)
16 : rng_(
std::move(rng))
20template <
typename Action>
21StateID RandomSuccessorSampler<Action>::sample(
24 const Distribution<StateID>& successors,
25 algorithms::StateProperties&)
27 return successors.sample(*rng_)->item;
This namespace contains implementations of transition successor samplers.
Definition arbitrary_sampler.h:7