AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
utils.h
1#ifndef CEGAR_UTILS_H
2#define CEGAR_UTILS_H
3
4#include "downward/task_proxy.h"
5
6#include "downward/utils/hash.h"
7
8#include <memory>
9#include <unordered_set>
10#include <utility>
11#include <vector>
12
13class AbstractTask;
14
15namespace additive_heuristic {
16class AdditiveHeuristic;
17}
18
19namespace cartesian_abstractions {
20
21/*
22 The set of relaxed-reachable facts is the possibly-before set of facts that
23 can be reached in the delete-relaxation before 'fact' is reached the first
24 time, plus 'fact' itself.
25*/
26extern utils::HashSet<FactProxy>
27get_relaxed_possible_before(const TaskProxy& task, const FactProxy& fact);
28
29extern std::vector<int> get_domain_sizes(const PlanningTaskProxy& task);
30} // namespace cartesian_abstractions
31
32/*
33 TODO: Our proxy classes are meant to be temporary objects and as such
34 shouldn't be stored in containers. Once we find a way to avoid
35 storing them in containers, we should remove this hashing function.
36*/
37namespace utils {
38inline void feed(HashState& hash_state, const FactProxy& fact)
39{
40 feed(hash_state, fact.get_pair());
41}
42} // namespace utils
43
44#endif