|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.browsecode.helpers.aisearch.AStar<N>
public abstract class AStar<N>
Field Summary | |
---|---|
static boolean |
debug
|
Constructor Summary | |
---|---|
AStar()
|
|
AStar(AISearchDomain<N> searchDomain)
|
Method Summary | |
---|---|
protected void |
doneWithRun()
Override this to know when the run stops. |
int |
getNumberOfThreads()
|
protected AISearchDomain<N> |
getSearchDomain()
|
int |
getSleepInEachMultiThreadLoop()
|
void |
run()
Call this to start A-Star searching. |
void |
setNumberOfThreads(int numThreads)
Set the number of threads for A-Star to use. |
void |
setSleepInEachMultiThreadLoop(int sleepInEachMultiThreadLoop)
This is the number of milliseconds of sleep time between checking up on threads (only applies if you setNumberOfThreads(>1)). |
protected void |
startRun()
Override this to know when the run starts. |
protected boolean |
stopNow()
Subclasses may override this and set a point to stop, i.e. when we have a good enough solution, a certain number of solutions, etc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean debug
Constructor Detail |
---|
public AStar()
public AStar(AISearchDomain<N> searchDomain)
Method Detail |
---|
protected AISearchDomain<N> getSearchDomain()
public void setNumberOfThreads(int numThreads)
public int getNumberOfThreads()
protected void startRun()
protected void doneWithRun()
protected boolean stopNow()
public int getSleepInEachMultiThreadLoop()
public void setSleepInEachMultiThreadLoop(int sleepInEachMultiThreadLoop)
sleepInEachMultiThreadLoop
- public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |