Lines Matching defs:node

14 // A node in the graph. This corresponds to an opsTask in the MDB world.
120 // left to right traversal, when a node is shifted to the left the current set of invalid
121 // nodes is examined to see if any needed to be moved to the right of that node. If so,
124 // method) means that each node affected by the new edges is only ever moved once.
170 // Get the list of node ids in the current sorted order
226 void dfs(Node* node, int upperBound) {
227 node->setVisited(true);
229 for (int i = 0; i < node->numDependents(); ++i) {
230 Node* dependent = node->dependent(i);
239 fStack.push_back({ sk_ref_sp(node), fNodes[upperBound].get() });
242 // Move 'node' to the index-th slot of the sort. The index-th slot should not have a current
244 void moveNodeInSort(sk_sp<Node> node, int index) {
246 fNodes[index] = node;
247 node->setIndexInSort(index);
251 // Does 'fStack' have 'node'? That is, was 'node' discovered to be in violation of the
253 bool stackContains(Node* node) {
255 if (node == fStack[i].fNode.get()) {
270 sk_sp<Node> node = fNodes[index];
272 if (node->visited()) {
273 // This node is in 'fStack' and was found to be in violation of the topological
276 SkASSERT(this->stackContains(node.get()));
277 node->setVisited(false); // reset for future use
281 // This node was found to not be in violation of any topological constraints but
283 SkASSERT(!this->stackContains(node.get()));
286 this->moveNodeInSort(node, index - numRemoved);
290 while (!fStack.empty() && node.get() == fStack.back().fDest) {
292 // of the nodes in 'fStack'. Place them to the right of 'node' in the sort. Note
430 g.addEdges(&dependedOn, nodeD); // nodes B and C must come before node D
434 g.addEdge(nodeA, nodeB); // node A must come before node B
435 g.addEdge(nodeA, nodeC); // node A must come before node C