QuickGraph


BellmanFordShortestPathAlgorithm<'TVertex, 'TEdge>

Namespace: QuickGraph.Algorithms.ShortestPath

Bellman Ford shortest path algorithm.

Constructors

ConstructorDescription
new(visitedGraph, weights)
Signature: (visitedGraph:IVertexAndEdgeListGraph<'TVertex,'TEdge> * weights:Func<'TEdge,float>) -> unit
new(...)
Signature: (visitedGraph:IVertexAndEdgeListGraph<'TVertex,'TEdge> * weights:Func<'TEdge,float> * distanceRelaxer:IDistanceRelaxer) -> unit
new(...)
Signature: (host:IAlgorithmComponent * visitedGraph:IVertexAndEdgeListGraph<'TVertex,'TEdge> * weights:Func<'TEdge,float> * distanceRelaxer:IDistanceRelaxer) -> unit

Instance members

Instance memberDescription
EdgeMinimized
Signature: EdgeAction<'TVertex,'TEdge>

Invoked during the second stage of the algorithm, during the test of whether each edge was minimized.

If the edge is minimized then this function is invoked.

EdgeNotMinimized
Signature: EdgeAction<'TVertex,'TEdge>

Invoked during the second stage of the algorithm, during the test of whether each edge was minimized.

If the edge was not minimized, this function is invoked. This happens when there is a negative cycle in the graph.

EdgeNotRelaxed
Signature: EdgeAction<'TVertex,'TEdge>

Invoked if the distance label for the target vertex is not decreased.

ExamineEdge
Signature: EdgeAction<'TVertex,'TEdge>

Invoked on every edge in the graph |V| times.

FoundNegativeCycle
Signature: bool
InitializeVertex
Signature: VertexAction<'TVertex>

Invoked on each vertex in the graph before the start of the algorithm.

Predecessors
Signature: IDictionary<'TVertex,'TVertex>

Constructed predecessor map

Fork me on GitHub