Move layers
functionality to rustworkx-core
#1167
Labels
rustworkx-core
Issues tracking adding functionality to rustworkx-core
layers
functionality to rustworkx-core
#1167
The
layers()
function is only exposed via a Python interface currently:rustworkx/src/dag_algo/mod.rs
Lines 227 to 345 in ab93329
We should port it to rustworkx-core, so that rust users can leverage the function.
One tweak that probably makes sense for the rustworkx-core version is that instead of returning a
PyList
for a Vec of Vecs of node weights we should have it return of an iterator of Vecs of node ids. This would be more flexible and performant for rust space users and for the python side of rustworkx we can just collect the iterator to a pylist (for backwards compatibility).The text was updated successfully, but these errors were encountered: