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.Heap

Extends comb.collections.Collection.
Defined in: Heap.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| comb.collections.Heap() Base class for Heap Implementations.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| count the current number of elements.
| isEmpty true if the Heap is empty.
| keys the keys of all items in the heap.
| values the values contained in the heap.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| clear() Empty the heap.
| containsKey(key) Determine if the heap contains a particular key.
| containsValue(value) Determine if the heap contains a particular value.
| insert(key, value) Insert a key value into the key
| peek() Gets he value of the root node with out removing it.
| peekKey() Gets the key of the root node without removing it.
| print() Print the heap.
| remove() Removes the root from the heap

Methods borrowed from class comb.collections.Collection:
  concat, indexOf, join, lastIndexOf, slice, toString

Class Detail
comb.collections.Heap()
Base class for Heap Implementations.
Field Detail
{Number} count
the current number of elements.

{Boolean} isEmpty
true if the Heap is empty.

{Array} keys
the keys of all items in the heap.

{Array} values
the values contained in the heap.
Method Detail
clear()
Empty the heap.

{Boolean} containsKey(key)
Determine if the heap contains a particular key.

Parameters:
key
  key to test.

Returns:
  {Boolean} true if the key is contained in this heap.

{Boolean} containsValue(value)
Determine if the heap contains a particular value.

Parameters:
value
  value to test.

Returns:
  {Boolean} true if the value is contained in this heap.

insert(key, value)
Insert a key value into the key

Parameters:
key
value

peek()
Gets he value of the root node with out removing it.

Returns:
  the value of the root

peekKey()
Gets the key of the root node without removing it.

Returns:
  the key of the root

print()
Print the heap.

remove()
Removes the root from the heap

Returns:
  the value of the root

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