On 11.01.2018 01:05, Evangelos Petsalis wrote: > Hi, > > I have a large graph (800K vertices and 6e6 edges) and I am running the > all_shortest_paths function with edge weights. The problem is that due to > the size of the graph, there are probably millions of paths that qualify and > the function fails with a "MemoryError" code. > > Is there a way to limit the number of shortest paths returned, or even > better a version that returns an iterator and compute the paths as needed?
The function all_shortest_paths() *DOES* return an iterator to all the paths! It does *not* store them all in memory. You must be doing some list conversion... -- Tiago de Paula Peixoto <[email protected]>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list [email protected] https://lists.skewed.de/mailman/listinfo/graph-tool
