Class DijkstraPathfinding
Computes Dijkstra's Algorithm.
This class to find paths starting at source, and terminating at a single point, or a range of points.
Inheritance
System.Object
DijkstraPathfinding
Assembly: Sylves.dll
Syntax
public class DijkstraPathfinding : Object
Constructors
DijkstraPathfinding(IGrid, Cell, Func<Step, Nullable<Single>>)
Declaration
public DijkstraPathfinding(IGrid grid, Cell src, Func<Step, Nullable<float>> stepLengths)
Parameters
Type |
Name |
Description |
IGrid |
grid |
|
Cell |
src |
|
System.Func<Step, System.Nullable<System.Single>> |
stepLengths |
|
Properties
Distances
Declaration
public Dictionary<Cell, float> Distances { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<Cell, System.Single> |
|
Methods
Declaration
public CellPath ExtractPathTo(Cell target)
Parameters
Type |
Name |
Description |
Cell |
target |
|
Returns
Run(Nullable<Cell>, Single)
Declaration
public void Run(Nullable<Cell> target = null, float maxRange = InfinityF)
Parameters
Type |
Name |
Description |
System.Nullable<Cell> |
target |
|
System.Single |
maxRange |
|