Home | History | Annotate | Download | only in src

Lines Matching full:node

74     // If the tree is empty, insert the new node.
75 root_ = new Node(key, C::kNoValue);
77 // Splay on the key to move the last node on the search path
86 // Insert the new node.
87 Node* node = new Node(key, C::kNoValue);
89 node->left_ = root_;
90 node->right_ = root_->right_;
93 node->right_ = root_;
94 node->left_ = root_->left_;
97 root_ = node;
123 // Splay on the key to move the node with the given key or the last
124 // node on the search path to the top of the tree.
126 // Now the result is either the root node or the greatest node in
133 Node* temp = root_;
147 // Splay on the key to move the node with the given key or the last
148 // node on the search path to the top of the tree.
150 // Now the result is either the root node or the least node in
157 Node* temp = root_;
170 Node* current = root_;
182 Node* current = root_;
195 // Splay on the key to move the node with the given key to the top.
205 Node* right = root_->right_;
222 Node dummy_node(C::kNoKey, C::kNoValue);
223 // Create a dummy node. The use of the dummy node is a bit
224 // counter-intuitive: The right child of the dummy node will hold
225 // the L tree of the algorithm. The left child of the dummy node
226 // will hold the R tree of the algorithm. Using a dummy node, left
228 Node* dummy = &dummy_node;
229 Node* left = dummy;
230 Node* right = dummy;
231 Node* current = root_;
239 Node* temp = current->left_;
255 Node* temp = current->right_;
282 ZoneList<Node*> nodes_to_visit(10);
286 Node* node = nodes_to_visit[pos++];
287 if (node == NULL) continue;
288 callback->Call(node->key(), node->value());
289 nodes_to_visit.Add(node->left());
290 nodes_to_visit.Add(node->right());