X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ef6867d3962e629e6fe2df4320d4d6a5e7964b7..d6eb772e45cc853fc204bb5aebeb411cdfa7c929:/src/mc/explo/udpor/EventSet.cpp diff --git a/src/mc/explo/udpor/EventSet.cpp b/src/mc/explo/udpor/EventSet.cpp index f0dd8d1c4d..09cb66b061 100644 --- a/src/mc/explo/udpor/EventSet.cpp +++ b/src/mc/explo/udpor/EventSet.cpp @@ -90,6 +90,11 @@ EventSet EventSet::make_union(const Configuration& config) const return make_union(config.get_events()); } +EventSet EventSet::get_local_config() const +{ + return History(*this).get_all_events(); +} + size_t EventSet::size() const { return this->events_.size(); @@ -132,6 +137,11 @@ bool EventSet::contains(const History& history) const return std::all_of(history.begin(), history.end(), [=](const UnfoldingEvent* e) { return this->contains(e); }); } +bool EventSet::intersects(const History& history) const +{ + return std::any_of(history.begin(), history.end(), [=](const UnfoldingEvent* e) { return this->contains(e); }); +} + bool EventSet::is_maximal() const { // A set of events is maximal if no event from