Hyperlinkv0.8.0-beta.28

Graph

Graph.AstarConfiginterfaceeffect/Graph.ts:3544
AstarConfig<E, N>

Configuration for finding a shortest path with the A* algorithm.

When to use

Use when configuring astar for point-to-point shortest-path searches where node data can provide a heuristic estimate toward the target.

Details

Specifies the source and target node indices, an edge-cost function, and a heuristic that estimates the remaining cost from a node to the target.

Source effect/Graph.ts:35446 lines
export interface AstarConfig<E, N> {
  source: NodeIndex
  target: NodeIndex
  cost: (edgeData: E) => number
  heuristic: (sourceNodeData: N, targetNodeData: N) => number
}
Referenced by 1 symbols