nx_parallel.algorithms.shortest_paths.weighted#

Shortest path parallel algorithms for weighted graphs.

Functions#

all_pairs_dijkstra(G[, cutoff, weight, get_chunks])

The parallel implementation first divides the nodes into chunks and then

all_pairs_dijkstra_path_length(G[, cutoff, weight, ...])

The parallel implementation first divides the nodes into chunks and then

all_pairs_dijkstra_path(G[, cutoff, weight, get_chunks])

The parallel implementation first divides the nodes into chunks and then

all_pairs_bellman_ford_path_length(G[, weight, get_chunks])

The parallel implementation first divides the nodes into chunks and then

all_pairs_bellman_ford_path(G[, weight, get_chunks])

The parallel implementation first divides the nodes into chunks and then

johnson(G[, weight, get_chunks])

The parallel computation is implemented by dividing the

Module Contents#

nx_parallel.algorithms.shortest_paths.weighted.all_pairs_dijkstra(G, cutoff=None, weight='weight', get_chunks='chunks')[source]#

The parallel implementation first divides the nodes into chunks and then creates a generator to lazily compute shortest paths and lengths 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.all_pairs_dijkstra : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra.html#all-pairs-dijkstra

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.weighted.all_pairs_dijkstra_path_length(G, cutoff=None, weight='weight', 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.all_pairs_dijkstra_path_length : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra_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.weighted.all_pairs_dijkstra_path(G, cutoff=None, weight='weight', 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.all_pairs_dijkstra_path : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra_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.

nx_parallel.algorithms.shortest_paths.weighted.all_pairs_bellman_ford_path_length(G, weight='weight', 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.all_pairs_bellman_ford_path_length : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.weighted.all_pairs_bellman_ford_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.weighted.all_pairs_bellman_ford_path(G, weight='weight', 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.all_pairs_bellman_ford_path : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.weighted.all_pairs_bellman_ford_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.

nx_parallel.algorithms.shortest_paths.weighted.johnson(G, weight='weight', get_chunks='chunks')[source]#

The parallel computation is implemented by dividing the nodes into chunks and computing the shortest paths using Johnson’s Algorithm for each chunk in parallel.

networkx.johnson : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.weighted.johnson.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.