1#include "probfd/successor_samplers/uniform_successor_sampler.h"
3#include "probfd/distribution.h"
5#include "downward/utils/rng.h"
12template <
typename Action>
13UniformSuccessorSampler<Action>::UniformSuccessorSampler(
int random_seed)
14 : rng_(
std::make_shared<utils::RandomNumberGenerator>(random_seed))
18template <
typename Action>
19UniformSuccessorSampler<Action>::UniformSuccessorSampler(
20 std::shared_ptr<utils::RandomNumberGenerator> rng)
21 : rng_(
std::move(rng))
25template <
typename Action>
26StateID UniformSuccessorSampler<Action>::sample(
29 const Distribution<StateID>& successors,
30 algorithms::StateProperties&)
32 assert(!successors.empty());
33 return successors.begin()[rng_->random(successors.size())].item;
This namespace contains implementations of transition successor samplers.
Definition arbitrary_sampler.h:7