Dijkstra et A* corrigé2.1
This commit is contained in:
parent
4e07fd986e
commit
efeba4104c
1 changed files with 1 additions and 2 deletions
|
@ -121,8 +121,7 @@ public class AStarAlgorithm extends DijkstraAlgorithm {
|
||||||
|
|
||||||
|
|
||||||
// to observe the path search
|
// to observe the path search
|
||||||
if (Double.isInfinite(OldCost)
|
if (Double.isInfinite(OldCost) && Double.isFinite(NewCost)) {
|
||||||
&& Double.isFinite(NewCost)) {
|
|
||||||
notifyNodeReached(arc.getDestination());
|
notifyNodeReached(arc.getDestination());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue