Skip to content

Commit

Permalink
fix(object_merger): fix shadowVariable (#7941)
Browse files Browse the repository at this point in the history
fix:shadowVariable

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
  • Loading branch information
kobayu858 authored Jul 10, 2024
1 parent f65af78 commit aaf465f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,12 @@ void SSP::maximizeLinearAssignment(

#ifndef NDEBUG
// Check if the potentials are feasible potentials
for (int v = 0; v < n_nodes; ++v) {
for (auto it_incident_edge = adjacency_list.at(v).cbegin();
it_incident_edge != adjacency_list.at(v).cend(); ++it_incident_edge) {
for (int w = 0; w < n_nodes; ++w) {
for (auto it_incident_edge = adjacency_list.at(w).cbegin();
it_incident_edge != adjacency_list.at(w).cend(); ++it_incident_edge) {
if (it_incident_edge->capacity > 0) {
double reduced_cost =
it_incident_edge->cost + potentials.at(v) - potentials.at(it_incident_edge->dst);
it_incident_edge->cost + potentials.at(w) - potentials.at(it_incident_edge->dst);
assert(reduced_cost >= 0);
}
}
Expand Down

0 comments on commit aaf465f

Please sign in to comment.