Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix most cosmetics and code warnings
[simgrid.git] / src / mc / explo / udpor / EventSet.hpp
index 9488c1b32e529d0daca1a6cfc46915e724039b53..db42ff21980896563482670a7209cdc0c7514296 100644 (file)
@@ -24,7 +24,8 @@ public:
   EventSet& operator=(const EventSet&) = default;
   EventSet& operator=(EventSet&&)      = default;
   EventSet(EventSet&&)                 = default;
-  explicit EventSet(std::unordered_set<UnfoldingEvent*>&& raw_events) : events_(raw_events) {}
+  explicit EventSet(Configuration&& config);
+  explicit EventSet(std::unordered_set<UnfoldingEvent*>&& raw_events) : events_(std::move(raw_events)) {}
   explicit EventSet(std::initializer_list<UnfoldingEvent*> event_list) : events_(std::move(event_list)) {}
 
   auto begin() const { return this->events_.begin(); }
@@ -49,11 +50,25 @@ public:
   size_t size() const;
   bool empty() const;
   bool contains(UnfoldingEvent*) const;
+  bool contains(const History&) const;
   bool is_subset_of(const EventSet&) const;
-  bool is_valid_configuration() const;
 
   bool operator==(const EventSet& other) const { return this->events_ == other.events_; }
   bool operator!=(const EventSet& other) const { return this->events_ != other.events_; }
+
+public:
+  /**
+   * @brief Whether or not this set of events could
+   * represent a configuration
+   */
+  bool is_valid_configuration() const;
+
+  /**
+   * @brief Whether or not this set of events is
+   * a *maximal event set*, i.e. whether each element
+   * of the set causes none of the others
+   */
+  bool is_maximal_event_set() const;
 };
 
 } // namespace simgrid::mc::udpor