Source code for routing.pathfinding.finder.dijkstra
"""Dijkstra: the compiled search without heuristic."""
from ..core.diagonal_movement import DiagonalMovement
from ..core.heuristic import null
from .finder import Finder
[docs]
class DijkstraFinder(Finder):
"""Dijkstra pathfinding: the cheapest path, no heuristic."""
def __init__(self, diagonal_movement: int = DiagonalMovement.never, **keywords: object) -> None:
"""Set the finder up with the null heuristic."""
super().__init__(heuristic=null, diagonal_movement=diagonal_movement, **keywords)