Home | History | Annotate | Download | only in v8-v4

Lines Matching full:node

48       string : 'String for key ' + key + ' in leaf node'
67 // Insert new node with a unique key.
130 * Pointer to the root node of the tree.
132 * @type {SplayTree.Node}
147 * Inserts a node into the tree with the specified key and value if
148 * the tree does not already contain a node with the specified key. If
156 this.root_ = new SplayTree.Node(key, value);
159 // Splay on the key to move the last node on the search path for
165 var node = new SplayTree.Node(key, value);
167 node.left = this.root_;
168 node.right = this.root_.right;
171 node.right = this.root_;
172 node.left = this.root_.left;
175 this.root_ = node;
180 * Removes a node with the specified key from the tree if the tree
181 * contains a node with this key. The removed node is returned. If the
185 * @return {SplayTree.Node} The removed node.
212 * Returns the node having the specified key or null if the tree doesn't contain
213 * a node with the specified key.
216 * @return {SplayTree.Node} Node having the specified key.
228 * @return {SplayTree.Node} Node having the maximum key value that
235 // Splay on the key to move the node with the given key or the last
236 // node on the search path to the top of the tree.
238 // Now the result is either the root node or the greatest node in
256 this.root_.traverse_(function(node) { result.push(node.key); });
263 * Perform the splay operation for the given key. Moves the node with
264 * the given key to the top of the tree. If no node has the given
265 * key, the last node on the search path is moved to the top of the
276 // Create a dummy node. The use of the dummy node is a bit
277 // counter-intuitive: The right child of the dummy node will hold
278 // the L tree of the algorithm. The left child of the dummy node
279 // will hold the R tree of the algorithm. Using a dummy node, left
282 dummy = left = right = new SplayTree.Node(null, null);
335 * Constructs a Splay tree node.
340 SplayTree.Node = function(key, value) {
347 * @type {SplayTree.Node}
349 SplayTree.Node.prototype.left = null;
353 * @type {SplayTree.Node}
355 SplayTree.Node.prototype.right = null;
360 * this SplayTree.Node.
362 * @param {function(SplayTree.Node)} f Visitor function.
365 SplayTree.Node.prototype.traverse_ = function(f) {