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.
export interface interface 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.
BellmanFordConfig<function (type parameter) E in BellmanFordConfig<E>E> {
BellmanFordConfig<E>.source: NodeIndexsource: type NodeIndex = numberNode index for node identification using plain numbers.
When to use
Use when storing or passing the stable identifier of a graph node between
Graph operations.
Details
addNode allocates node identifiers from the graph's next node index.
Gotchas
A NodeIndex is an identifier, not an array offset. Removed node identifiers
are not reused.
NodeIndex
BellmanFordConfig<E>.target: NodeIndextarget: type NodeIndex = numberNode index for node identification using plain numbers.
When to use
Use when storing or passing the stable identifier of a graph node between
Graph operations.
Details
addNode allocates node identifiers from the graph's next node index.
Gotchas
A NodeIndex is an identifier, not an array offset. Removed node identifiers
are not reused.
NodeIndex
BellmanFordConfig<E>.cost: (edgeData: E) => numbercost: (edgeData: EedgeData: function (type parameter) E in BellmanFordConfig<E>E) => number
}