rustworkx.graph_num_shortest_paths_unweighted#
- graph_num_shortest_paths_unweighted(graph, source, /)#
Get the number of unweighted shortest paths from a source node
- Parameters:
graph (PyGraph) – The graph to find the number of shortest paths on
source (int) – The source node to find the shortest paths from
- Returns:
A mapping of target node indices to the number of shortest paths from
source
to that node. If there is no path fromsource
to a node in the graph that node will not be preset in the output mapping.- Return type:
NumPathsMapping