Algorithm
Development Kit 1.0

algs.model.heap
Class ExternalBinaryHeap<E>

java.lang.Object
  extended by algs.model.heap.ExternalBinaryHeap<E>
Type Parameters:
E -

public class ExternalBinaryHeap<E>
extends java.lang.Object

Declared as 'External' since all comparison is external via a provided comparator class.

Functionality is identical to BinaryHeap

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Constructor Summary
ExternalBinaryHeap(int i, java.util.Comparator<E> comp)
          Construct a Binary heap of given size.
 
Method Summary
 void insert(E obj)
           
 boolean isEmpty()
          Determine if Binary Heap is empty.
 E smallest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalBinaryHeap

public ExternalBinaryHeap(int i,
                          java.util.Comparator<E> comp)
Construct a Binary heap of given size. All comparisons between elements are to use the provided Comparator

Parameters:
i -
comp -
Method Detail

isEmpty

public boolean isEmpty()
Determine if Binary Heap is empty.


insert

public void insert(E obj)

smallest

public E smallest()

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.