AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
merge_tree_factory.h
1#ifndef MERGE_AND_SHRINK_MERGE_TREE_FACTORY_H
2#define MERGE_AND_SHRINK_MERGE_TREE_FACTORY_H
3
4#include <memory>
5#include <string>
6#include <vector>
7
8class TaskProxy;
9
10namespace utils {
11class LogProxy;
12class RandomNumberGenerator;
13} // namespace utils
14
15namespace merge_and_shrink {
16class FactoredTransitionSystem;
17class MergeTree;
18enum class UpdateOption;
19
20class MergeTreeFactory {
21protected:
22 std::shared_ptr<utils::RandomNumberGenerator> rng;
23 UpdateOption update_option;
24 virtual std::string name() const = 0;
25 virtual void dump_tree_specific_options(utils::LogProxy&) const {}
26
27public:
28 MergeTreeFactory(int random_seed, UpdateOption update_option);
29 virtual ~MergeTreeFactory() = default;
30 void dump_options(utils::LogProxy& log) const;
31 // Compute a merge tree for the given entire task.
32 virtual std::unique_ptr<MergeTree>
33 compute_merge_tree(const TaskProxy& task_proxy) = 0;
34 /* Compute a merge tree for the given current factored transition,
35 system, possibly for a subset of indices. */
36 virtual std::unique_ptr<MergeTree> compute_merge_tree(
37 const TaskProxy& task_proxy,
38 const FactoredTransitionSystem& fts,
39 const std::vector<int>& indices_subset);
40 virtual bool requires_init_distances() const = 0;
41 virtual bool requires_goal_distances() const = 0;
42};
43
44} // namespace merge_and_shrink
45
46#endif