AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
open_list.h
1#ifndef PROBFD_ALGORITHMS_OPEN_LIST_H
2#define PROBFD_ALGORITHMS_OPEN_LIST_H
3
4#include "probfd/types.h"
5#include "probfd/value_type.h"
6
7namespace probfd::algorithms {
8
17template <typename Action>
18class OpenList {
19public:
20 virtual ~OpenList() = default;
21
23 [[nodiscard]]
24 virtual unsigned size() const = 0;
25
27 virtual void push(StateID state_id) = 0;
28
30 virtual StateID pop() = 0;
31
33 virtual void clear() = 0;
34
36 [[nodiscard]]
37 virtual bool empty() const
38 {
39 return size() == 0;
40 }
41
43 virtual void push(StateID, Action, value_t, StateID state_id)
44 {
45 push(state_id);
46 }
47};
48
49} // namespace probfd::algorithms
50
51#endif // PROBFD_ALGORITHMS_OPEN_LIST_H
virtual void push(StateID state_id)=0
Offers a new state to the open list.
virtual unsigned size() const =0
Gets the current number f states in the open list.
virtual void push(StateID, Action, value_t, StateID state_id)
Offers a new state to the open list that is the target of a transition.
Definition open_list.h:43
virtual bool empty() const
Checks if the open list is empty.
Definition open_list.h:37
virtual StateID pop()=0
Extract the next state from the open list.
virtual void clear()=0
Clears the open list.
This namespace contains implementations of SSP search algorithms.
Definition acyclic_value_iteration.h:22
double value_t
Typedef for the state value type.
Definition aliases.h:7
A StateID represents a state within a StateIDMap. Just like Fast Downward's StateID type,...
Definition types.h:22