@graphty/algorithms / index / bellmanFord
Function: bellmanFord() ​
bellmanFord(
graph,source,options):BellmanFordResult
Defined in: algorithms/shortest-path/bellman-ford.ts:52
Find shortest paths from source using Bellman-Ford algorithm
Parameters ​
graph ​
The graph to search
source ​
The starting node for the search
options ​
BellmanFordOptions = {}
Algorithm options including optional target for early termination
Returns ​
The distances, predecessors, and negative cycle information