|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.alg.RRAStar<N>
N - the node typepublic final class RRAStar<N>
Implements the RRA* (Reverse Resumable A*) algorithm as described in Cooperative Pathfinding by David Silver. The RRA* algorithm is a modified A* search in a reverse direction.
The search starts at the specified goal node g, and heads towards the start node s. Instead of
terminating at s, the search continues until a specified node n is expanded (see
getCost(Object) and getSuccessor(Object), where the argument is the node n).
| Constructor Summary | |
|---|---|
RRAStar(Graph<N,?> graph,
CostFunction<N,?> cost,
N start,
N goal)
Creates a new RRA* algorithm instance. |
|
| Method Summary | |
|---|---|
double |
getCost(N node)
Returns the cost of the optimal path from the given node to the goal node specified in the constructor. |
N |
getSuccessor(N node)
Returns the successor of the given node in the optimal path to the goal node specified in the constructor. |
RRAStar<N> |
setEdgeFilter(GraphElementFilter<Edge<N>> edgeFilter)
Sets the filter specifying whether an edge may be traversed or must not be included in the path. |
RRAStar<N> |
setNodeFilter(GraphElementFilter<N> nodeFilter)
Sets the filter specifying whether a node may be traversed or must not be included in the path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RRAStar(Graph<N,?> graph,
CostFunction<N,?> cost,
N start,
N goal)
graph - the graph to traversecost - the cost to use for traversalstart - the start nodegoal - the goal node| Method Detail |
|---|
public RRAStar<N> setNodeFilter(GraphElementFilter<N> nodeFilter)
nodeFilter - the filter specifying whether a node may be traversed or must not be included in the path
public RRAStar<N> setEdgeFilter(GraphElementFilter<Edge<N>> edgeFilter)
edgeFilter - the filter specifying whether an edge may be traversed or must not be included in the path
public double getCost(N node)
node - the node for which to return the cost
public N getSuccessor(N node)
node - the node for which to return the successor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||