Home | History | Annotate | Download | only in benchmarks

Lines Matching defs:Node

53       string : 'String for key ' + tag + ' in leaf node'
72 // Insert new node with a unique key.
136 * Pointer to the root node of the tree.
138 * @type {SplayTree.Node}
153 * Inserts a node into the tree with the specified key and value if
154 * the tree does not already contain a node with the specified key. If
162 this.root_ = new SplayTree.Node(key, value);
165 // Splay on the key to move the last node on the search path for
171 var node = new SplayTree.Node(key, value);
173 node.left = this.root_;
174 node.right = this.root_.right;
177 node.right = this.root_;
178 node.left = this.root_.left;
181 this.root_ = node;
186 * Removes a node with the specified key from the tree if the tree
187 * contains a node with this key. The removed node is returned. If the
191 * @return {SplayTree.Node} The removed node.
218 * Returns the node having the specified key or null if the tree doesn't contain
219 * a node with the specified key.
222 * @return {SplayTree.Node} Node having the specified key.
234 * @return {SplayTree.Node} Node having the maximum key value.
249 * @return {SplayTree.Node} Node having the maximum key value that
256 // Splay on the key to move the node with the given key or the last
257 // node on the search path to the top of the tree.
259 // Now the result is either the root node or the greatest node in
277 this.root_.traverse_(function(node) { result.push(node.key); });
284 * Perform the splay operation for the given key. Moves the node with
285 * the given key to the top of the tree. If no node has the given
286 * key, the last node on the search path is moved to the top of the
297 // Create a dummy node. The use of the dummy node is a bit
298 // counter-intuitive: The right child of the dummy node will hold
299 // the L tree of the algorithm. The left child of the dummy node
300 // will hold the R tree of the algorithm. Using a dummy node, left
303 dummy = left = right = new SplayTree.Node(null, null);
356 * Constructs a Splay tree node.
361 SplayTree.Node = function(key, value) {
368 * @type {SplayTree.Node}
370 SplayTree.Node.prototype.left = null;
374 * @type {SplayTree.Node}
376 SplayTree.Node.prototype.right = null;
381 * this SplayTree.Node.
383 * @param {function(SplayTree.Node)} f Visitor function.
386 SplayTree.Node.prototype.traverse_ = function(f) {