This documents the development version of NetworkX. Documentation for the current release can be found here.
bidirectional_shortest_path(G, source, target)¶
Returns a list of nodes in a shortest path between source and target.
- GNetworkX graph
- sourcenode label
starting node for path
- targetnode label
ending node for path
- path: list
List of nodes in a path from source to target.
If no path exists between source and target.
This algorithm is used by shortest_path(G, source, target).