Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianPommerening committed Feb 7, 2024
1 parent 94c4457 commit 0702697
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/search/operator_counting/delete_relaxation_constraints_rr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class VEGraph {
variable and value.
*/
vector<vector<Node>> nodes;
vector<tuple<FactPair, FactPair, FactPair>> delta;
utils::HashSet<tuple<FactPair, FactPair, FactPair>> delta;
utils::HashSet<pair<FactPair, FactPair>> edges;
priority_queues::AdaptiveQueue<FactPair> elimination_queue;

Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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));
}
}
Expand All @@ -100,7 +100,7 @@ class VEGraph {
for (tuple<FactPair, FactPair, FactPair> shortcut : new_shortcuts) {
auto [from, _, to] = shortcut;
add_edge(from, to);
delta.push_back(shortcut);
delta.insert(shortcut);
}

/*
Expand Down Expand Up @@ -152,7 +152,7 @@ class VEGraph {
}
}

const vector<tuple<FactPair, FactPair, FactPair>> &get_delta() const {
const utils::HashSet<tuple<FactPair, FactPair, FactPair>> &get_delta() const {
return delta;
}

Expand Down

0 comments on commit 0702697

Please sign in to comment.