Pathfindings.BellmanFord (libgraph v0.16.0)
The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is capable of handling graphs in which some of the edge weights are negative numbers
Time complexity: O(VLogV)
Link to this section Summary
Functions
Returns nil when graph has negative cycle.
Link to this section Types
Link to this type
distance()
@type distance() :: %{required(Graph.vertex_id()) => integer()}
Link to this section Functions
Link to this function
call(graph, a)
@spec call(Graph.t(), Graph.vertex()) :: [Graph.vertex()] | nil
Returns nil when graph has negative cycle.