1#ifndef PROBFD_CACHING_TASK_STATE_SPACE_H
2#define PROBFD_CACHING_TASK_STATE_SPACE_H
4#include "probfd/task_state_space.h"
6#include "probfd/storage/segmented_memory_pool.h"
8#include "probfd/fdr_types.h"
9#include "probfd/types.h"
11#include "downward/per_state_information.h"
27class ProbabilisticTask;
34class CachingTaskStateSpace :
public TaskStateSpace {
37 bool is_initialized()
const
39 return naops != std::numeric_limits<unsigned>::max();
42 unsigned naops = std::numeric_limits<unsigned>::max();
43 OperatorID* aops =
nullptr;
44 StateID* succs =
nullptr;
47 PerStateInformation<CacheEntry> cache_;
48 storage::SegmentedMemoryPool<> cache_data_;
50 std::vector<OperatorID> aops_;
51 std::vector<StateID> successors_;
54 CachingTaskStateSpace(
55 std::shared_ptr<ProbabilisticTask> task,
57 std::vector<std::shared_ptr<::Evaluator>> path_dependent_evaluators);
59 void generate_applicable_actions(
61 std::vector<OperatorID>& result)
final;
63 void generate_action_transitions(
65 OperatorID operator_id,
66 Distribution<StateID>& result)
final;
68 void generate_all_transitions(
70 std::vector<OperatorID>& aops,
71 std::vector<Distribution<StateID>>& successors)
final;
73 void generate_all_transitions(
75 std::vector<TransitionType>& transitions)
final;
77 void print_statistics() const final;
80 void compute_successor_states(
83 std::vector<StateID>& successors);
85 void setup_cache(const State& state, CacheEntry& entry);
87 CacheEntry& lookup(const State& state);
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8