This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
- digraph_all_pairs_all_simple_paths(graph, /, min_depth=None, cutoff=None)#
Return all the simple paths between all pairs of nodes in the graph
This function is multithreaded and will launch a thread pool with threads equal to the number of CPUs by default. You can tune the number of threads with the
RAYON_NUM_THREADSenvironment variable. For example, setting
RAYON_NUM_THREADS=4would limit the thread pool to 4 threads.
graph (PyDiGraph) – The graph to find all simple paths in
min_depth (int) – The minimum depth of the path to include in the output list of paths. By default all paths are included regardless of depth, setting to 0 will behave like the default.
cutoff (int) – The maximum depth of path to include in the output list of paths. By default includes all paths regardless of depth, setting to 0 will behave like default.
A mapping of source node indices to a mapping of target node indices to a list of paths between the source and target nodes.
- Return type:
ValueError – If
cutoffare < 2