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 where T : struct
Type Parameters
T

Constructors

Dykstra(DirectedDynamicGraph, WeightHandler<T>, IEnumerable<EdgePath<T>>, Func<UInt32, IEnumerable<UInt32[]>>, Boolean, T)

Creates a new routing algorithm instance.

Declaration
public Dykstra(DirectedDynamicGraph graph, WeightHandler<T> weightHandler, IEnumerable<EdgePath<T>> sources, Func<uint, IEnumerable<uint[]>> getRestrictions, bool backward, T max)
Parameters
DirectedDynamicGraph graph

WeightHandler<T> weightHandler

IEnumerable<EdgePath<T>> sources

Func<System.UInt32, IEnumerable<System.UInt32[]>> getRestrictions

System.Boolean backward

T max

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 DirectedDynamicGraph Graph { get; }
Property Value
DirectedDynamicGraph

WasFound

Gets or sets the wasfound function to be called when a new vertex is found.

Declaration
public Func<EdgePath<T>, bool> WasFound { get; set; }
Property Value
Func<EdgePath<T>, System.Boolean>

Methods

DoRun(CancellationToken)

Executes the actual run of the algorithm.

Declaration
protected override void DoRun(CancellationToken cancellationToken)
Parameters
CancellationToken cancellationToken

Overrides
AlgorithmBase.DoRun(CancellationToken)

Initialize()

Initializes and resets.

Declaration
public void Initialize()

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 visits output parameter with the best visit data.

Declaration
public bool TryGetVisit(uint vertex, out EdgePath<T> visits)
Parameters
System.UInt32 vertex

EdgePath<T> visits

Returns
System.Boolean

TryGetVisits(UInt32, out LinkedEdgePath<T>)

Returns true if the given vertex was visited and sets the visits output parameter with the actual visits data.

Declaration
public bool TryGetVisits(uint vertex, out LinkedEdgePath<T> visits)
Parameters
System.UInt32 vertex

LinkedEdgePath<T> visits

Returns
System.Boolean

Back to top Built by Itinero, MIT licensed.