has_path#

has_path(G, source, target)[source]#

Returns True if G has a path from source to target.

Parameters:
GNetworkX graph
sourcenode

Starting node for path

targetnode

Ending node for path


Additional backends implement this function

cugraph : GPU-accelerated backend.

graphblas : OpenMP-enabled sparse linear algebra backend.