Hyperlinkv0.8.0-beta.28

Graph

Graph.BellmanFordConfiginterfaceeffect/Graph.ts:3772
BellmanFordConfig<E>

Configuration for finding a shortest path with the Bellman-Ford algorithm.

When to use

Use when configuring bellmanFord to find a shortest path where edge weights may be negative.

Details

Specifies the source and target node indices, plus a cost function that maps each edge's data to a numeric weight.

Source effect/Graph.ts:37725 lines
export interface BellmanFordConfig<E> {
  source: NodeIndex
  target: NodeIndex
  cost: (edgeData: E) => number
}
Referenced by 1 symbols