Skip to content

Commit

Permalink
fix(tracking_object_merger): fix shadowVariable (autowarefoundation#7948
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 and Ariiees committed Jul 22, 2024
1 parent 2af1f1d commit c401da5
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 c401da5

Please sign in to comment.