org.annotation.util
Class ArrayHeap

java.lang.Object
  extended byorg.annotation.util.ArrayHeap
All Implemented Interfaces:
Heap

public class ArrayHeap
extends java.lang.Object
implements Heap


Constructor Summary
ArrayHeap(int sz, java.util.Comparator c)
           
 
Method Summary
 void clear()
           
 java.lang.Object extract()
           
 void insert(java.lang.Object o)
           
 java.util.Iterator iterator()
           
 int left(int i)
           
 int length()
           
 int parent(int i)
           
 int right(int i)
           
 void setSize()
           
 void setSize(int sz)
           
 int size()
           
 java.lang.Object top()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayHeap

public ArrayHeap(int sz,
                 java.util.Comparator c)
Method Detail

parent

public int parent(int i)

left

public int left(int i)

right

public int right(int i)

size

public int size()
Specified by:
size in interface Heap

length

public int length()

extract

public java.lang.Object extract()
Specified by:
extract in interface Heap

setSize

public void setSize()
Specified by:
setSize in interface Heap

setSize

public void setSize(int sz)
Specified by:
setSize in interface Heap

top

public java.lang.Object top()
Specified by:
top in interface Heap

insert

public void insert(java.lang.Object o)
Specified by:
insert in interface Heap

clear

public void clear()
Specified by:
clear in interface Heap

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface Heap


Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.