Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow iteration over maximal subsets of an EventSet
[simgrid.git] / src / mc / explo / udpor / maximal_subsets_iterator.cpp
index 1dd635a..a33d418 100644 (file)
@@ -6,11 +6,10 @@
 
 namespace simgrid::mc::udpor {
 
-maximal_subsets_iterator::maximal_subsets_iterator(const Configuration& config,
-                                                   std::optional<node_filter_function> filter)
-    : config({config}), current_maximal_set({EventSet()})
+maximal_subsets_iterator::maximal_subsets_iterator(const EventSet& events, std::optional<node_filter_function> filter)
+    : current_maximal_set({EventSet()})
 {
-  const auto candidate_ordering = config.get_topologically_sorted_events_of_reverse_graph();
+  const auto candidate_ordering = events.get_topological_ordering_of_reverse_graph();
   if (filter.has_value()) {
     // Only store the events in the ordering that "matter" to us
     std::copy_if(std::move_iterator(candidate_ordering.begin()), std::move_iterator(candidate_ordering.end()),