Lines Matching refs:predecessors
16 # Number of predecessors, generally >= 0. When this value falls to 0,
51 for node, predecessors in graph.items():
52 self.add(node, *predecessors)
59 def add(self, node, *predecessors):
60 """Add a new node and its predecessors to the graph.
62 Both the *node* and all elements in *predecessors* must be hashable.
67 It is possible to add a node with no dependencies (*predecessors* is not provided)
69 is included among *predecessors* it will be automatically added to the graph with
70 no predecessors of its own.
79 nodeinfo.npredecessors += len(predecessors)
82 for pred in predecessors:
111 Initially it returns all nodes with no predecessors; once those are marked
113 have all their predecessors already processed. Once no more progress can be made,
189 # Go to all the successors and reduce the number of predecessors, collecting all the ones