Show / Hide Table of Contents

Class Dykstra<T>

An implementation of the dykstra routing algorithm.

Inheritance
System.Object
AlgorithmBase
Dykstra<T>
Dykstra
Inherited Members
AlgorithmBase.HasRun
AlgorithmBase.HasSucceeded
AlgorithmBase.ErrorMessage
AlgorithmBase.CheckHasRun()
AlgorithmBase.CheckHasRunAndHasSucceeded()
AlgorithmBase.Run()
AlgorithmBase.Run(CancellationToken)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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

Gets the current.

Declaration
public EdgePath<T> Current { get; }
Property Value
EdgePath<T>

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
AlgorithmBase.DoRun(CancellationToken)

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

Back to top Built by Itinero, MIT licensed.