doc(test): explain imprecisions with very long paths
This commit is contained in:
parent
fd69c3b30c
commit
5b59292839
1 changed files with 3 additions and 0 deletions
|
@ -357,6 +357,9 @@ public abstract class ShortestPathAlgorithmTest {
|
|||
// On a des erreurs d'arrondi assez grande avec la distance, mais elles sont mineures
|
||||
// relativement aux distance de 300000 ici.
|
||||
assert((Math.abs(algo.getCostPath() - path.getPath().getLength())) < 1000.0);
|
||||
// Probable explication :
|
||||
// - `algo.getCostPath()` : somme de double
|
||||
// - `path.getPath().getLength()` : somme de float
|
||||
// Selon le chemin sélectionné on peut avoir une estimation de la longueur qu'on est censée avoir.
|
||||
// Avec notre long chemin: entre 250 et 260 kilomètres.
|
||||
assert(algo.getCostPath() > 250000 && algo.getCostPath() < 260000);
|
||||
|
|
Loading…
Reference in a new issue