Lines Matching refs:Node
25 // If the tree is empty, insert the new node.
26 root_ = new(allocator_) Node(key, Config::NoValue());
28 // Splay on the key to move the last node on the search path
37 // Insert the new node.
38 Node* node = new(allocator_) Node(key, Config::NoValue());
39 InsertInternal(cmp, node);
47 void SplayTree<Config, Allocator>::InsertInternal(int cmp, Node* node) {
49 node->left_ = root_;
50 node->right_ = root_->right_;
53 node->right_ = root_;
54 node->left_ = root_->left_;
57 root_ = node;
92 // Splay on the key to move the node with the given key or the last
93 // node on the search path to the top of the tree.
95 // Now the result is either the root node or the greatest node in
102 Node* temp = root_;
116 // Splay on the key to move the node with the given key or the last
117 // node on the search path to the top of the tree.
119 // Now the result is either the root node or the least node in
126 Node* temp = root_;
139 Node* current = root_;
151 Node* current = root_;
164 Node* node_to_move = root_;
169 // A node with the target key already exists.
183 Node* node_to_remove = root_;
197 Node* right = root_->right_;
213 Node dummy_node(Config::kNoKey, Config::NoValue());
214 // Create a dummy node. The use of the dummy node is a bit
215 // counter-intuitive: The right child of the dummy node will hold
216 // the L tree of the algorithm. The left child of the dummy node
217 // will hold the R tree of the algorithm. Using a dummy node, left
219 Node* dummy = &dummy_node;
220 Node* left = dummy;
221 Node* right = dummy;
222 Node* current = root_;
230 Node* temp = current->left_;
246 Node* temp = current->right_;
281 List<Node*, Allocator> nodes_to_visit(10, allocator_);
285 Node* node = nodes_to_visit[pos++];
286 if (node->left() != NULL) nodes_to_visit.Add(node->left(), allocator_);
287 if (node->right() != NULL) nodes_to_visit.Add(node->right(), allocator_);
288 callback->Call(node);