|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdatastructures.Minheap
public class Minheap
This is a priority queue for Nodes implemented as min binary heap comparing f_values.
Constructor Summary | |
---|---|
Minheap(int max)
|
Method Summary | |
---|---|
void |
insert(Node n)
Inserts a node to heap. |
boolean |
is_empty()
Return true if heap is empty. |
Node |
remove_middle(Node n)
We search for node with same x and y value as given node. |
Node |
removemin()
Removes and returns smallest node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Minheap(int max)
Method Detail |
---|
public boolean is_empty()
public void insert(Node n)
n
- node to be inserted.public Node removemin()
public Node remove_middle(Node n)
n
- node to look for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |