Home | History | Annotate | Download | only in benchmarks

Lines Matching full:node

53       string : 'String for key ' + key + ' in leaf node'
72 // Insert new node with a unique key.
135 * Pointer to the root node of the tree.
137 * @type {SplayTree.Node}
152 * Inserts a node into the tree with the specified key and value if
153 * the tree does not already contain a node with the specified key. If
161 this.root_ = new SplayTree.Node(key, value);
164 // Splay on the key to move the last node on the search path for
170 var node = new SplayTree.Node(key, value);
172 node.left = this.root_;
173 node.right = this.root_.right;
176 node.right = this.root_;
177 node.left = this.root_.left;
180 this.root_ = node;
185 * Removes a node with the specified key from the tree if the tree
186 * contains a node with this key. The removed node is returned. If the
190 * @return {SplayTree.Node} The removed node.
217 * Returns the node having the specified key or null if the tree doesn't contain
218 * a node with the specified key.
221 * @return {SplayTree.Node} Node having the specified key.
233 * @return {SplayTree.Node} Node having the maximum key value that
240 // Splay on the key to move the node with the given key or the last
241 // node on the search path to the top of the tree.
243 // Now the result is either the root node or the greatest node in
261 this.root_.traverse_(function(node) { result.push(node.key); });
268 * Perform the splay operation for the given key. Moves the node with
269 * the given key to the top of the tree. If no node has the given
270 * key, the last node on the search path is moved to the top of the
281 // Create a dummy node. The use of the dummy node is a bit
282 // counter-intuitive: The right child of the dummy node will hold
283 // the L tree of the algorithm. The left child of the dummy node
284 // will hold the R tree of the algorithm. Using a dummy node, left
287 dummy = left = right = new SplayTree.Node(null, null);
340 * Constructs a Splay tree node.
345 SplayTree.Node = function(key, value) {
352 * @type {SplayTree.Node}
354 SplayTree.Node.prototype.left = null;
358 * @type {SplayTree.Node}
360 SplayTree.Node.prototype.right = null;
365 * this SplayTree.Node.
367 * @param {function(SplayTree.Node)} f Visitor function.
370 SplayTree.Node.prototype.traverse_ = function(f) {