public interface IGraphSearch
Modifier and Type | Method and Description |
---|---|
GraphEdge[] |
getExaminedEdges()
Get all the edges examined during the search.
|
<T> T[] |
getExaminedEdges(T[] array)
Get all the edges examined during the search.
|
GraphNode[] |
getRoute()
Get the path found as an array of GraphNode(s) in start->end
order
|
<T> T[] |
getRoute(T[] array)
Get the path found as an array of T(s) in start->end
order.
|
java.util.LinkedList<GraphNode> |
search(int startID,
int targetID)
Search for a route from node startID and ends at targetID.
|
java.util.LinkedList<GraphNode> |
search(int startID,
int targetID,
boolean remember)
Search for a route from node startID and ends at targetID.
|
java.util.LinkedList<GraphNode> search(int startID, int targetID)
startID
- id of the start nodetargetID
- id of the target nodejava.util.LinkedList<GraphNode> search(int startID, int targetID, boolean remember)
startID
- id of the start nodetargetID
- id of the target noderemember
- whether to remember the examined edges.GraphEdge[] getExaminedEdges()
<T> T[] getExaminedEdges(T[] array)
array
- the array to populateGraphNode[] getRoute()
<T> T[] getRoute(T[] array)
array
- the array to populateProcessing library AI_for_2D_Games by Peter Lager. (C) 2013