Skip to main content

dijkstra

Function dijkstra 

Source
pub fn dijkstra(
    store: &LpgStore,
    source: NodeId,
    weight_property: Option<&str>,
) -> DijkstraResult
Expand description

Runs Dijkstra’s algorithm from a source node.

§Arguments

  • store - The graph store
  • source - Starting node ID
  • weight_property - Optional property name for edge weights (defaults to 1.0)

§Returns

Distances and predecessors for all reachable nodes.

§Complexity

O((V + E) log V) using a binary heap.