Show / Hide Table of Contents

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
Namespace: Sylves
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

ExtractPathTo(Cell)

Declaration
public CellPath ExtractPathTo(Cell target)
Parameters
Type Name Description
Cell target
Returns
Type Description
CellPath

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
In This Article
Back to top Generated by DocFX