Public Member Functions | |
A_Star_Queue () | |
void | add (A_Star_Node node) |
void | signalDecreasedF (A_Star_Node node) |
boolean | isEmpty () |
A_Star_Node | poll () |
void | remove (A_Star_Node node) |
This class is almost the same as java.util.PriorityQueue
from Sun OpenJDK 1.7 but is simplified for the specific usage as a high-performance queue for the A_Star_Algo
. It also has an added feature to change the value of an element without needing to readd. It only includes the functions needed for this algorithm and thus cannot be used as a multi-purpose container anymore!
|
inline |
Creates a new A_Star_Queue with 100 elements starting capacity.
|
inline |
Inserts the specified element into this priority queue.
node | the node to add |
|
inline |
Checks if this queue is empty.
true
if it's empty, else false
|
inline |
Polls (get and remove) the first element.
|
inline |
Removes a node from this queue.
node | the node to be removed from this queue, if present |
|
inline |
Call this function after you have set a node to a smaller f-value. This saves from first removing and later adding the element.
node | the node which has a smaller f-value |