Class Index | File Index

## Classes

- _global_
- comb
- comb.array
- comb.characters
- comb.collections
- comb.collections.AnderssonTree
- comb.collections.AVLTree
- comb.collections.BinaryTree
- comb.collections.Collection
- comb.collections.HashTable
- comb.collections.Heap
- comb.collections.Iterable
- comb.collections.MaxHeap
- comb.collections.MinHeap
- comb.collections.Pool
- comb.collections.PriorityQueue
- comb.collections.Queue
- comb.collections.RedBlackTree
- comb.collections.Stack
- comb.collections.Tree
- comb.date
- comb.logging
- comb.logging.appenders
- comb.logging.appenders.Appender
- comb.logging.appenders.ConsoleAppender
- comb.logging.appenders.FileAppender
- comb.logging.appenders.JSONAppender
- comb.logging.appenders.RollingFileAppender
- comb.logging.BasicConfigurator
- comb.logging.Level
- comb.logging.Logger
- comb.logging.PropertyConfigurator
- comb.number
- comb.plugins
- comb.plugins.Broadcaster
- comb.plugins.Middleware
- comb.Promise
- comb.PromiseList
- comb.regexp
- comb.string

# Class comb.collections.AVLTree

Extends comb.collections.Tree.

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one. Lookup, insertion, and deletion all take O(log n) time in both the average and worst cases, where n is the number of nodes in the tree prior to the operation. Insertions and deletions may require the tree to be rebalanced by one or more tree rotations.

AVL trees are more rigidly balanced than red-black trees, leading to slower insertion and removal but faster retrieval

Performance

| Best | Worst
Space | O(n) | O(n)
Search | O(log n) | O(log n)
Insert | O(log n) | O(log n)
Delete | O(log n) | O(log n)

Defined in: AVLTree.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| comb.collections.AVLTree()

Methods borrowed from class comb.collections.Tree:
  clear, contains, every, filter, find, findGreaterThan, findLessThan, forEach, insert, isEmpty, map, print, reduce, reduceRight, remove, some, toArray, traverse, traverseWithCondition
Methods borrowed from class comb.collections.Collection:
  concat, indexOf, join, lastIndexOf, slice, toString

Class Detail
comb.collections.AVLTree()

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 13:20:06 GMT-0500 (CDT)