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

Lines Matching defs:SplayTree

41 var splayTree = null;
71 } while (splayTree.find(key) != null);
73 splayTree.insert(key, payload);
80 splayTree = new SplayTree();
89 var keys = splayTree.exportKeys();
90 splayTree = null;
111 var greatest = splayTree.findGreatestLessThan(key);
112 if (greatest == null) splayTree.remove(key);
113 else splayTree.remove(greatest.key);
126 function SplayTree() {
133 * @type {SplayTree.Node}
136 SplayTree.prototype.root_ = null;
142 SplayTree.prototype.isEmpty = function() {
155 SplayTree.prototype.insert = function(key, value) {
157 this.root_ = new SplayTree.Node(key, value);
166 var node = new SplayTree.Node(key, value);
186 * @return {SplayTree.Node} The removed node.
188 SplayTree.prototype.remove = function(key) {
217 * @return {SplayTree.Node} Node having the specified key.
219 SplayTree.prototype.find = function(key) {
229 * @return {SplayTree.Node} Node having the maximum key value.
231 SplayTree.prototype.findMax = function(opt_startNode) {
244 * @return {SplayTree.Node} Node having the maximum key value that
247 SplayTree.prototype.findGreatestLessThan = function(key) {
269 SplayTree.prototype.exportKeys = function() {
288 SplayTree.prototype.splay_ = function(key) {
298 dummy = left = right = new SplayTree.Node(null, null);
356 SplayTree.Node = function(key, value) {
363 * @type {SplayTree.Node}
365 SplayTree.Node.prototype.left = null;
369 * @type {SplayTree.Node}
371 SplayTree.Node.prototype.right = null;
376 * this SplayTree.Node.
378 * @param {function(SplayTree.Node)} f Visitor function.
381 SplayTree.Node.prototype.traverse_ = function(f) {