X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c2efce902d8be417616c84ebe54645a77b9cb60b..cdb6ecd3df93a73f169fe3f0d8e0e846d699f95d:/src/kernel/routing/FloydZone.cpp diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index b434384bcd..4162fa4cb7 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -191,12 +191,11 @@ void FloydZone::seal() for (unsigned int c = 0; c < table_size; c++) { for (unsigned int a = 0; a < table_size; a++) { for (unsigned int b = 0; b < table_size; b++) { - if (TO_FLOYD_COST(a, c) < DBL_MAX && TO_FLOYD_COST(c, b) < DBL_MAX) { - if (fabs(TO_FLOYD_COST(a, b) - DBL_MAX) < std::numeric_limits::epsilon() || - (TO_FLOYD_COST(a, c) + TO_FLOYD_COST(c, b) < TO_FLOYD_COST(a, b))) { - TO_FLOYD_COST(a, b) = TO_FLOYD_COST(a, c) + TO_FLOYD_COST(c, b); - TO_FLOYD_PRED(a, b) = TO_FLOYD_PRED(c, b); - } + if (TO_FLOYD_COST(a, c) < DBL_MAX && TO_FLOYD_COST(c, b) < DBL_MAX && + (fabs(TO_FLOYD_COST(a, b) - DBL_MAX) < std::numeric_limits::epsilon() || + (TO_FLOYD_COST(a, c) + TO_FLOYD_COST(c, b) < TO_FLOYD_COST(a, b)))) { + TO_FLOYD_COST(a, b) = TO_FLOYD_COST(a, c) + TO_FLOYD_COST(c, b); + TO_FLOYD_PRED(a, b) = TO_FLOYD_PRED(c, b); } } }