public class AStarOpenListPriorityQueue2 extends java.lang.Object implements AStarOpenListBase<AStarNode>
Constructor and Description |
---|
AStarOpenListPriorityQueue2() |
Modifier and Type | Method and Description |
---|---|
void |
addNodeToOpenList(AStarNode node)
Inserts a node in the list of nodes to be visited later while searching.
|
void |
clearOpenList()
Removes all nodes from the open list.
|
java.util.Collection<AStarNode> |
dumpOpenList() |
AStarNode |
findOpenNode(int x,
int y,
int z)
If this position has not yet been visited by the A* search, this method
returns the node associated with the given position.
|
boolean |
isOpenListEmpty()
Returns if there are no nodes to be visited.
|
AStarNode |
removeCheapestOpenNode()
Returns the node with the cheapest total cost, and removes it from the open
list.
|
void |
removeNodeFromOpenList(AStarNode node)
If contained in the list of nodes to be visited later, the given node is
removed.
|
void |
setMap(AStarMapBase<AStarNode> map) |
public void setMap(AStarMapBase<AStarNode> map)
public void addNodeToOpenList(AStarNode node)
AStarOpenListBase
addNodeToOpenList
in interface AStarOpenListBase<AStarNode>
node
- The node to add.public AStarNode findOpenNode(int x, int y, int z)
AStarOpenListBase
findOpenNode
in interface AStarOpenListBase<AStarNode>
x
- X-position of the map to be checked.y
- Y-position of the map to be checked.z
- Z-position of the map to be checked.null
otherwise.public boolean isOpenListEmpty()
AStarOpenListBase
isOpenListEmpty
in interface AStarOpenListBase<AStarNode>
true
if there are no nodes left, false
otherwise.public AStarNode removeCheapestOpenNode()
AStarOpenListBase
removeCheapestOpenNode
in interface AStarOpenListBase<AStarNode>
null
otherwise.public java.util.Collection<AStarNode> dumpOpenList()
public void removeNodeFromOpenList(AStarNode node)
AStarOpenListBase
removeNodeFromOpenList
in interface AStarOpenListBase<AStarNode>
node
- The node to be removed.public void clearOpenList()
AStarOpenListBase
clearOpenList
in interface AStarOpenListBase<AStarNode>