Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
EvtSetTools class deifined
authoreazimi <azimi.ehsan@outlook.com>
Tue, 12 Jan 2021 11:21:24 +0000 (12:21 +0100)
committereazimi <azimi.ehsan@outlook.com>
Tue, 12 Jan 2021 11:21:24 +0000 (12:21 +0100)
src/mc/udpor_global.hpp

index f44c988..bb56103 100644 (file)
@@ -15,6 +15,20 @@ namespace mc {
 class UnfoldingEvent;
 using EventSet = std::deque<UnfoldingEvent*>;
 
+class EvtSetTools {
+public:
+  static bool contains(const EventSet events, const UnfoldingEvent* e);
+  static UnfoldingEvent* find(const EventSet events, const UnfoldingEvent* e);
+  static void subtract(EventSet& events, EventSet const& otherSet);
+  static bool depends(EventSet const& events, EventSet const& otherSet);
+  static bool isEmptyIntersection(EventSet evtS1, EventSet evtS2);
+  static EventSet makeUnion(EventSet s1, EventSet s2);
+  static void pushBack(EventSet& events, UnfoldingEvent* e);
+  static void remove(EventSet& events, UnfoldingEvent* e);
+  static EventSet minus(EventSet events, UnfoldingEvent* e);
+  static EventSet plus(EventSet events, UnfoldingEvent* e);
+};
+
 typedef struct s_evset_in {
   EventSet causuality_events;
   EventSet cause;