Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
rustworkx.TopologicalSorter.done#
- TopologicalSorter.done(nodes)#
Marks a set of nodes returned by
get_ready()as processed.This method unblocks any successor of each node in
nodesfor being returned in the future by a call toget_ready().- Parameters:
nodes (int | list[int]) – A node index or list of node indices to be marked as done.
- Raises:
ValueError – If any node in
nodeshas already been marked as processed by a previous call to this method or node has not yet been returned byget_ready()`().ValueError – If one of the given
initialnodes is a direct successor of one of the nodes given todone(). This can only happen if theinitialnodes had even a partial topological ordering amongst themselves, which is not a valid starting input.