Using multiprocessing for finding network paths
I am currently using the networkx function *all_simple_paths* to find all paths within a network G, for a given set of source and target nodes. On larger/denser networks this process is incredibly intensive. I would like to know if multiprocessing could conceivably be used on this problem, and if anybody had any ideas on how that might be implemented, through creating a Pool etc. import networkx as nx G = nx.complete_graph(8) sources = [1,2] targets = [5,6,7] for target in targets: for source in sources: for path in nx.all_simple_paths(G, source=source, target=target, cutoff=None): print(path)