NetworkX

Previous topic

average_shortest_path_length

Next topic

single_source_shortest_path

has_path

has_path(G, source, target)[source]

Return true if G has a path from source to target. False otherwise.

Parameters :

G : NetworkX graph

source : node

Starting node for path.

target : node

Ending node for path.