avltree.js
No description.

File Location

/goog/structs/avltree.js

Classes

goog.structs.AvlTree
Constructs an AVL-Tree, which uses the specified comparator to order its values. The values can be accessed efficiently in their sorted order since the tree enforces a O(logn) maximum height.
goog.structs.AvlTree.Node
Constructs an AVL-Tree node with the specified value. If no parent is specified, the node's parent is assumed to be null. The node's height defaults to 1 and its children default to null.

Public Protected Private

Global Functions

goog.structs.AvlTree.DEFAULT_COMPARATOR_(ab) number
String comparison function used to compare values in the tree. This function is used by default if no comparator is specified in the tree's constructor.
Arguments:
a : T
The first value.
b : T
The second value.
Returns: number  -1 if a < b, 1 if a > b, 0 if a = b.
code »

Directory structs

File Reference