-
Notifications
You must be signed in to change notification settings - Fork 1
/
actionset.h
56 lines (48 loc) · 1.55 KB
/
actionset.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef ACTIONSET_H
#define ACTIONSET_H
#include "setcompositions.h"
#include "task.h"
#include <unordered_set>
class ProofChecker;
class ActionSet
{
public:
ActionSet();
virtual ~ActionSet() {}
virtual void get_actions(const ProofChecker &proof_checker,
std::unordered_set<size_t> &indices) const = 0;
virtual bool is_constantall() const = 0;
};
class ActionSetBasic : public ActionSet
{
private:
std::unordered_set<size_t> action_indices;
public:
ActionSetBasic(std::unordered_set<size_t> &action_indices);
virtual void get_actions(const ProofChecker &proof_checker,
std::unordered_set<size_t> &indices) const override;
virtual bool is_constantall() const override;
};
class ActionSetUnion : public ActionSet, public SetUnion
{
private:
SetID id_left;
SetID id_right;
public:
ActionSetUnion(SetID id_left, SetID id_right);
virtual void get_actions(const ProofChecker &action_sets,
std::unordered_set<size_t> &indices) const override;
virtual bool is_constantall() const override;
virtual SetID get_left_id() const override;
virtual SetID get_right_id() const override;
};
class ActionSetConstantAll : public ActionSet
{
std::unordered_set<int> action_indices;
public:
ActionSetConstantAll(Task &task);
virtual void get_actions(const ProofChecker &proof_checker,
std::unordered_set<size_t> &indices) const override;
virtual bool is_constantall() const override;
};
#endif /* ACTIONSET_H */