Lines Matching refs:nodes
21 # List of successor nodes. The list can contain duplicated elements as
33 of nodes, such that each node is, in the graph, an immediate predecessor of the
42 """Provides functionality to topologically sort a graph of hashable nodes"""
90 still be used to obtain as many nodes as possible until cycles block more
92 therefore no more nodes can be added using "add".
103 # nodes as possible before cycles block more progress
106 raise CycleError(f"nodes are in a cycle", cycle)
109 """Return a tuple of all the nodes that are ready.
111 Initially it returns all nodes with no predecessors; once those are marked
112 as processed by calling "done", further calls will return all new nodes that
121 # Get the nodes that are ready and mark them
127 # Clean the list of nodes that are ready and update
128 # the counter of nodes that we have returned.
138 are still nodes ready that haven't yet been returned by "get_ready" or the
139 number of nodes marked "done" is less than the number that have been returned
151 def done(self, *nodes):
152 """Marks a set of nodes returned by "get_ready" as processed.
154 This method unblocks any successor of each node in *nodes* for being returned
157 Raises :exec:`ValueError` if any node in *nodes* has already been marked as
168 for node in nodes:
236 """Returns an iterable of nodes in a topological order.