Skip to content

Commit

Permalink
Previous commit causes unable to find shortest path
Browse files Browse the repository at this point in the history
  • Loading branch information
SiberiaWolfP committed Feb 13, 2024
1 parent cb66073 commit 49494a0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions duckpgq/src/duckpgq/functions/scalar/iterativelength.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ static bool IterativeLength(int64_t v_size, int64_t *v, vector<int64_t> &e,
// change |= next[i].any();
}

vector<std::bitset<LANE_LIMIT>> next_next = vector<std::bitset<LANE_LIMIT>>(v_size, 0);
// If a vertex in next is a successor of other vertices in next, set it as unvisited
for (auto i = 0; i < v_size; i++) {
if (next[i].any()) {
for (auto offset = v[i]; offset < v[i + 1]; offset++) {
auto n = e[offset];
next_next[n] = next_next[n] | next[i];
}
}
}
for (auto i = 0; i < v_size; i++) {
next[i] = next[i] & ~next_next[i];
}
// vector<std::bitset<LANE_LIMIT>> next_next = vector<std::bitset<LANE_LIMIT>>(v_size, 0);
// // If a vertex in next is a successor of other vertices in next, set it as unvisited
// for (auto i = 0; i < v_size; i++) {
// if (next[i].any()) {
// for (auto offset = v[i]; offset < v[i + 1]; offset++) {
// auto n = e[offset];
// next_next[n] = next_next[n] | next[i];
// }
// }
// }
// for (auto i = 0; i < v_size; i++) {
// next[i] = next[i] & ~next_next[i];
// }

for (auto i = 0; i < v_size; i++) {
change |= next[i].any();
Expand Down

0 comments on commit 49494a0

Please sign in to comment.