public class ThetaStar extends GridAStar
| Constructor and Description |
|---|
ThetaStar()
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeBestPath(java.util.List<java.util.List<GridNode>> searchArea,
GridNode node,
GridNode neighbor)
Determines whether to set a neighbor's parent to the node or to the node's parent.
|
protected int |
distanceBetweenNodes(GridNode a,
GridNode b)
Returns the approximate distance between two nodes in the search area.
|
java.util.List<GridNode> |
findPath(java.util.List<java.util.List<GridNode>> searchArea,
GridNode start,
GridNode dest)
Returns a List representing the path between two nodes in a two-dimensional search space.
|
java.util.List<java.util.List<java.lang.String>> |
getVisibilityGraph(java.util.List<java.util.List<GridNode>> searchArea,
GridNode node) |
static void |
main(java.lang.String[] args) |
void |
printAllLOSNodeCombinations(java.util.List<java.util.List<GridNode>> searchArea) |
computeBestPath, getManhattanDistance, printPath, printSearchArea, reconstructPathpublic java.util.List<GridNode> findPath(java.util.List<java.util.List<GridNode>> searchArea, GridNode start, GridNode dest)
findPath in interface Pathfinder<GridNode,java.util.List<java.util.List<GridNode>>>findPath in class GridAStarstart - the start node for the path search and must inherit from Nodedest - the destination node for the path search and must inherit from NodeList,
HashSet,
PriorityQueue,
GridAStar.reconstructPath(GridNode, GridNode),
GridAStar.computeBestPath(GridNode, GridNode)protected void computeBestPath(java.util.List<java.util.List<GridNode>> searchArea, GridNode node, GridNode neighbor)
node - the current node being visited in the path searchneighbor - a neighbor of nodeList,
lineOfSight(java.util.List, GridNode, GridNode),
distanceBetweenNodes(GridNode, GridNode)protected int distanceBetweenNodes(GridNode a, GridNode b)
distanceBetweenNodes in class GridAStara - first nodeb - second nodeMathpublic void printAllLOSNodeCombinations(java.util.List<java.util.List<GridNode>> searchArea)
public java.util.List<java.util.List<java.lang.String>> getVisibilityGraph(java.util.List<java.util.List<GridNode>> searchArea, GridNode node)
public static void main(java.lang.String[] args)