grape.general_graph.GeneralGraph.shortest_path_list_kernel

GeneralGraph.shortest_path_list_kernel(nodes, shortest_path)[source]

Collect the shortest paths that contain at least two nodes.

Parameters
  • nodes (list) – list of nodes for which to compute the list of shortest paths.

  • shortest_path (dict) – nested dictionary with key corresponding to source, while as value a dictionary keyed by target and valued by the source-target shortest path.

Returns

list of shortest paths.

Return type

list