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

Lines Matching defs:SplayTree

41 var splayTree = null;
71 } while (splayTree.find(key) != null);
72 splayTree.insert(key, GeneratePayloadTree(kSplayTreePayloadDepth, key));
79 splayTree = new SplayTree();
88 var keys = splayTree.exportKeys();
89 splayTree = null;
110 var greatest = splayTree.findGreatestLessThan(key);
111 if (greatest == null) splayTree.remove(key);
112 else splayTree.remove(greatest.key);
125 function SplayTree() {
132 * @type {SplayTree.Node}
135 SplayTree.prototype.root_ = null;
141 SplayTree.prototype.isEmpty = function() {
154 SplayTree.prototype.insert = function(key, value) {
156 this.root_ = new SplayTree.Node(key, value);
165 var node = new SplayTree.Node(key, value);
185 * @return {SplayTree.Node} The removed node.
187 SplayTree.prototype.remove = function(key) {
216 * @return {SplayTree.Node} Node having the specified key.
218 SplayTree.prototype.find = function(key) {
228 * @return {SplayTree.Node} Node having the maximum key value that
231 SplayTree.prototype.findGreatestLessThan = function(key) {
253 SplayTree.prototype.exportKeys = function() {
272 SplayTree.prototype.splay_ = function(key) {
282 dummy = left = right = new SplayTree.Node(null, null);
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) {