|
|||||||||
| Home >> All >> com >> port80 >> graph >> dot >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.port80.graph.dot.impl
Class CellHeap

java.lang.Objectcom.port80.graph.dot.impl.CellHeap
- public class CellHeap
- extends java.lang.Object
Using this heap is about 25% faster than using BinarySearch and LinkedList.
| Field Summary | |
private static boolean |
CHECK
|
private static int |
fMAXSIZE
|
private Cell[] |
heap
|
private static java.lang.String |
NAME
|
private int |
size
|
| Constructor Summary | |
CellHeap()
|
|
CellHeap(int n)
|
|
| Method Summary | |
void |
clear()
|
Cell |
dequeue()
|
void |
enqueue(Cell a)
|
Cell |
get(int i)
|
int |
getMaxSize()
|
private void |
growTo(int n)
|
static void |
main(java.lang.String[] args)
|
private void |
moveDown(int k)
|
int |
printHeap(java.lang.StringBuffer buf,
int index,
java.lang.String indent)
|
void |
requeue(Cell a)
Reorder the given cell with value changed. |
int |
sanityCheck()
|
private int |
sanityCheck(int index)
|
int |
size()
|
private static int |
test1()
sanityCheck() test. |
private static int |
test2()
enqueue() and dequeue() tests. |
private static int |
test3()
requeue() test. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
CHECK
private static final boolean CHECK
- See Also:
- Constant Field Values
fMAXSIZE
private static int fMAXSIZE
size
private int size
heap
private Cell[] heap
| Constructor Detail |
CellHeap
public CellHeap()
CellHeap
public CellHeap(int n)
| Method Detail |
size
public int size()
get
public Cell get(int i)
enqueue
public void enqueue(Cell a)
dequeue
public Cell dequeue()
requeue
public void requeue(Cell a)
- Reorder the given cell with value changed.
getMaxSize
public int getMaxSize()
clear
public void clear()
sanityCheck
public int sanityCheck()
sanityCheck
private int sanityCheck(int index)
printHeap
public int printHeap(java.lang.StringBuffer buf, int index, java.lang.String indent)
moveDown
private void moveDown(int k)
growTo
private void growTo(int n)
main
public static void main(java.lang.String[] args)
test1
private static int test1()
- sanityCheck() test.
test2
private static int test2()
- enqueue() and dequeue() tests.
test3
private static int test3()
- requeue() test.
|
|||||||||
| Home >> All >> com >> port80 >> graph >> dot >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.port80.graph.dot.impl.CellHeap