From 070269720da5f60fd7cf652fb3bd464973ccdea5 Mon Sep 17 00:00:00 2001 From: Florian Pommerening Date: Wed, 7 Feb 2024 19:01:49 +0100 Subject: [PATCH] bugfixes --- .../delete_relaxation_constraints_rr.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/search/operator_counting/delete_relaxation_constraints_rr.cc b/src/search/operator_counting/delete_relaxation_constraints_rr.cc index a5e256b9d5..517a8c3fb5 100644 --- a/src/search/operator_counting/delete_relaxation_constraints_rr.cc +++ b/src/search/operator_counting/delete_relaxation_constraints_rr.cc @@ -27,7 +27,7 @@ class VEGraph { variable and value. */ vector> nodes; - vector> delta; + utils::HashSet> delta; utils::HashSet> edges; priority_queues::AdaptiveQueue elimination_queue; @@ -67,7 +67,7 @@ class VEGraph { while (!elimination_queue.empty()) { const auto [key, fact] = elimination_queue.pop(); Node &node = get_node(fact); - if (node.in_degree == key) { + if (node.in_degree == key && !node.is_eliminated) { return fact; } } @@ -90,7 +90,7 @@ class VEGraph { if (get_node(successor).is_eliminated) { continue; } - if (!edges.count(make_pair(predecessor, successor))) { + if (predecessor != successor) { new_shortcuts.push_back(make_tuple(predecessor, fact, successor)); } } @@ -100,7 +100,7 @@ class VEGraph { for (tuple shortcut : new_shortcuts) { auto [from, _, to] = shortcut; add_edge(from, to); - delta.push_back(shortcut); + delta.insert(shortcut); } /* @@ -152,7 +152,7 @@ class VEGraph { } } - const vector> &get_delta() const { + const utils::HashSet> &get_delta() const { return delta; }