nx_parallel.algorithms.shortest_paths.unweighted#

Shortest path parallel algorithms for unweighted graphs.

Functions#

all_pairs_shortest_path_length(G[, cutoff, get_chunks])

The parallel implementation first divides the nodes into chunks and then

all_pairs_shortest_path(G[, cutoff, get_chunks])

The parallel implementation first divides the nodes into chunks and then

Module Contents#

nx_parallel.algorithms.shortest_paths.unweighted.all_pairs_shortest_path_length(G, cutoff=None, get_chunks='chunks')[source]#

The parallel implementation first divides the nodes into chunks and then creates a generator to lazily compute shortest paths lengths for each node in node_chunk, and then employs joblib’s Parallel function to execute these computations in parallel across n_jobs number of CPU cores.

networkx.single_source_shortest_path_length : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.unweighted.all_pairs_shortest_path_length.html

Parameters#

get_chunksstr, function (default = “chunks”)

A function that takes in an iterable of all the nodes as input and returns an iterable node_chunks. The default chunking is done by slicing the G.nodes into n_jobs number of chunks.

nx_parallel.algorithms.shortest_paths.unweighted.all_pairs_shortest_path(G, cutoff=None, get_chunks='chunks')[source]#

The parallel implementation first divides the nodes into chunks and then creates a generator to lazily compute shortest paths for each node_chunk, and then employs joblib’s Parallel function to execute these computations in parallel across n_jobs number of CPU cores.

networkx.single_source_shortest_path : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.unweighted.all_pairs_shortest_path.html

Parameters#

get_chunksstr, function (default = “chunks”)

A function that takes in an iterable of all the nodes as input and returns an iterable node_chunks. The default chunking is done by slicing the G.nodes into n_jobs number of chunks.