-maximal_subsets_iterator::maximal_subsets_iterator(const EventSet& events, std::optional<node_filter_function> filter,
+maximal_subsets_iterator::maximal_subsets_iterator(const EventSet& events,
+ const std::optional<node_filter_function>& filter,
std::optional<size_t> maximum_subset_size)
: maximum_subset_size(maximum_subset_size), current_maximal_set({EventSet()})
{
std::optional<size_t> maximum_subset_size)
: maximum_subset_size(maximum_subset_size), current_maximal_set({EventSet()})
{
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()),
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()),
has_started_searching = true;
return bookkeeper.find_next_candidate_event(topological_ordering.begin(), topological_ordering.end());
} else {
has_started_searching = true;
return bookkeeper.find_next_candidate_event(topological_ordering.begin(), topological_ordering.end());
} else {
{
if (const auto e_count = event_counts.find(e); e_count != event_counts.end()) {
return e_count->second == 0;
{
if (const auto e_count = event_counts.find(e); e_count != event_counts.end()) {
return e_count->second == 0;
topological_order_position last) const
{
return std::find_if(first, last, [&](const UnfoldingEvent* e) { return is_candidate_event(e); });
}
topological_order_position last) const
{
return std::find_if(first, last, [&](const UnfoldingEvent* e) { return is_candidate_event(e); });
}
xbt_assert(event_counts.find(e_hist) != event_counts.end(),
"Invariant Violation: Attempted to remove an event which was not previously added");
xbt_assert(event_counts[e_hist] > 0, "Invariant Violation: An event `e` had a count of `0` at this point "
xbt_assert(event_counts.find(e_hist) != event_counts.end(),
"Invariant Violation: Attempted to remove an event which was not previously added");
xbt_assert(event_counts[e_hist] > 0, "Invariant Violation: An event `e` had a count of `0` at this point "