single_source_shortest_path#

single_source_shortest_path(graph, source, cutoff=None)#

Calculates the single source shortest paths from a given source node.

Parameters:
  • graph (GraphView) – A reference to the graph. Must implement GraphViewOps.

  • source (NodeInput) – The source node.

  • cutoff (int, optional) – An optional cutoff level. The algorithm will stop if this level is reached.

Returns:

Mapping from end node to shortest path from the source node.

Return type:

NodeStateNodes