AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
landmark_status_manager.h
1#ifndef LANDMARKS_LANDMARK_STATUS_MANAGER_H
2#define LANDMARKS_LANDMARK_STATUS_MANAGER_H
3
4#include "downward/landmarks/landmark_graph.h"
5
6#include "downward/per_state_bitset.h"
7
8namespace landmarks {
9class LandmarkGraph;
10class LandmarkNode;
11
12class LandmarkStatusManager {
13 LandmarkGraph& lm_graph;
14 const std::vector<LandmarkNode*> goal_landmarks;
15 const std::vector<std::pair<LandmarkNode*, std::vector<LandmarkNode*>>>
16 greedy_necessary_children;
17 const std::vector<std::pair<LandmarkNode*, std::vector<LandmarkNode*>>>
18 reasonable_parents;
19
20 PerStateBitset past_landmarks;
21 PerStateBitset future_landmarks;
22
23 void progress_landmarks(
24 ConstBitsetView& parent_past,
25 ConstBitsetView& parent_future,
26 const State& parent_ancestor_state,
27 BitsetView& past,
28 BitsetView& future,
29 const State& ancestor_state);
30 void progress_goals(const State& ancestor_state, BitsetView& future);
31 void progress_greedy_necessary_orderings(
32 const State& ancestor_state,
33 const BitsetView& past,
34 BitsetView& future);
35 void
36 progress_reasonable_orderings(const BitsetView& past, BitsetView& future);
37
38public:
39 LandmarkStatusManager(
40 LandmarkGraph& graph,
41 bool progress_goals,
42 bool progress_greedy_necessary_orderings,
43 bool progress_reasonable_orderings);
44
45 BitsetView get_past_landmarks(const State& state);
46 BitsetView get_future_landmarks(const State& state);
47 ConstBitsetView get_past_landmarks(const State& state) const;
48 ConstBitsetView get_future_landmarks(const State& state) const;
49
50 void progress_initial_state(const State& initial_state);
51 void progress(
52 const State& parent_ancestor_state,
53 OperatorID op_id,
54 const State& ancestor_state);
55};
56} // namespace landmarks
57
58#endif