Open sambaPython24 opened 7 months ago
It would be nice but it would require a major redesign in the way we do iterators. Until coroutines are stable we don't really have an equivalent for Python's yield
keyword that is trivial to implement.
With regards to the from_
argument, the argument has different names in the type-agnostic all_simple_paths
and the type-specific digraph_all_simple_paths
. But it is a positional-only argument so it doesn't matter
What is the expected enhancement?
networkx returns a generator from e.g. rx.all_simple_paths. That is useful for very large graphs with many possible paths, since we can loop over the generator without filling the memory and break if other conditions are fulfilled.
Ps.: The documentation for rx.all_simplepaths needs to be fixed: the arguments name is not ```from
but
origin```. (Signature: rx.all_simplepaths(graph, from, to, min_depth=None, cutoff=None)