Class Dykstra<T>
An implementation of the dykstra routing algorithm.
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class Dykstra<T> : AlgorithmBase, IEdgeVisitor<T>, IAlgorithm where T : struct
Type Parameters
T
|
Constructors
Dykstra(Graph, Func<UInt32, UInt32>, WeightHandler<T>, IEnumerable<EdgePath<T>>, T, Boolean)
Creates a new one-to-all dykstra algorithm instance.
Declaration
public Dykstra(Graph graph, Func<uint, uint> getRestriction, WeightHandler<T> weightHandler, IEnumerable<EdgePath<T>> sources, T sourceMax, bool backward)
Parameters
Graph
graph
|
Func<System.UInt32, System.UInt32>
getRestriction
|
WeightHandler<T>
weightHandler
|
IEnumerable<EdgePath<T>>
sources
|
T
sourceMax
|
System.Boolean
backward
|
Properties
Backward
Gets the backward flag.
Declaration
public bool Backward { get; }
Property Value
System.Boolean
|
Current
Graph
Gets the graph.
Declaration
public Graph Graph { get; }
Property Value
Graph
|
MaxReached
Gets the max reached flag.
Declaration
public bool MaxReached { get; }
Property Value
System.Boolean
|
Remarks
True if the source-max value was reached.
Visit
Gets or sets the visit function to be called when a new path is found.
Declaration
public VisitDelegate<T> Visit { get; set; }
Property Value
VisitDelegate<T>
|
WasFound
Gets or sets the wasfound function to be called when a new vertex is found.
Declaration
public Dykstra<T>.WasFoundDelegate WasFound { get; set; }
Property Value
Dykstra.WasFoundDelegate<>
|
Methods
DoRun(CancellationToken)
Executes the algorithm.
Declaration
protected override void DoRun(CancellationToken cancellationToken)
Parameters
CancellationToken
cancellationToken
|
Overrides
Initialize()
Initializes and resets.
Declaration
public void Initialize()
SetVisit(EdgePath<T>)
Sets a visit on a vertex from an external source (like a transit-algorithm).
Declaration
public bool SetVisit(EdgePath<T> visit)
Parameters
EdgePath<T>
visit
|
Returns
System.Boolean
True if the visit was set successfully. |
Remarks
The algorithm will pick up these visits as if it was one it's own.
Step()
Executes one step in the search.
Declaration
public bool Step()
Returns
System.Boolean
|
TryGetVisit(UInt32, out EdgePath<T>)
Returns true if the given vertex was visited and sets the visit output parameters with the actual visit data.
Declaration
public bool TryGetVisit(uint vertex, out EdgePath<T> visit)
Parameters
System.UInt32
vertex
|
EdgePath<T>
visit
|
Returns
System.Boolean
|