|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.deepthought.sidious.planner.AStarAlgorithm
@ThreadSafe public class AStarAlgorithm
Implements the A* search algorithm.
Field Summary | |
---|---|
private boolean |
cancelled
Flag to stop the calculation. |
private static org.apache.commons.logging.Log |
logger
Logger for this class. |
Constructor Summary | |
---|---|
AStarAlgorithm()
|
Method Summary | |
---|---|
void |
cancel()
Cancels the search. |
private void |
jAStar(Graph graph)
This method implements the A* algorithm. |
void |
search(Graph graph)
This is the search algorithm. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log logger
private volatile boolean cancelled
Constructor Detail |
---|
public AStarAlgorithm()
Method Detail |
---|
public void search(Graph graph)
Pathfinder
search
in interface Pathfinder
graph
- the graph to be searchedprivate void jAStar(Graph graph)
The resulting shortest path is represented in the traversed graph, by following the predecessors from end vertex to start vertex.
graph
- the graph to be searchedpublic void cancel()
Pathfinder
cancel
in interface Pathfinder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |