DijkstraAlgorithm
Dijsktra's algorithm for finding the optimal path between two cells. Short description of the algorithm:
Create a priority queue of paths.
Add the start cell to the queue.
While the last cell in the path is not the end cell:
For each neighbor of the last cell:
Fork the path to the neighbor.
Add the forked path to the queue.
Poll the queue to get the next path.
Repeat until the last cell in the path is the end cell.
Return the path. For more information, refer to Dijkstra's algorithm on Wikipedia.
Functions
Link copied to clipboard
open override fun findPath(start: Cell, end: Cell, travelCost: CellTravelCostSupplier): RoutingResult
Finds the optimal path between the start and end cell using the given travel cost supplier.
Link copied to clipboard
Gets the name of the algorithm.