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, IAlgorithm, IEdgeVisitor<T> where T : struct
Type Parameters
T
|
Constructors
Dykstra(Graph, WeightHandler<T>, Func<UInt32, IEnumerable<UInt32[]>>, IEnumerable<EdgePath<T>>, T, Boolean)
Creates a new one-to-all dykstra algorithm instance.
Declaration
public Dykstra(Graph graph, WeightHandler<T> weightHandler, Func<uint, IEnumerable<uint[]>> getRestriction, IEnumerable<EdgePath<T>> sources, T sourceMax, bool backward)
Parameters
Graph
graph
|
WeightHandler<T>
weightHandler
|
Func<System.UInt32, IEnumerable<System.UInt32[]>>
getRestriction
|
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>
|
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(Int64, out EdgePath<T>)
Returns true if the given edge was visited and sets the visit output parameters with the actual visit data.
Declaration
public bool TryGetVisit(long edge, out EdgePath<T> visit)
Parameters
System.Int64
edge
|
EdgePath<T>
visit
|
Returns
System.Boolean
|