Class DepthFirstSearch<N,A>
- java.lang.Object
-
- ai.libs.jaicore.basic.algorithm.AAlgorithm<I,O>
-
- ai.libs.jaicore.basic.algorithm.ASolutionCandidateIterator<I,O>
-
- ai.libs.jaicore.search.core.interfaces.AAnyPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>,N,A>
-
- ai.libs.jaicore.search.algorithms.standard.dfs.DepthFirstSearch<N,A>
-
- Type Parameters:
N
-A
-
- All Implemented Interfaces:
java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>
,java.util.concurrent.Callable<SearchGraphPath<N,A>>
,java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>
,org.api4.java.ai.graphsearch.problem.IPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>,N,A>
,org.api4.java.ai.graphsearch.problem.IPathSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>,N,A>
,org.api4.java.algorithm.IAlgorithm<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>>
,org.api4.java.algorithm.ISolutionCandidateIterator<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>>
,org.api4.java.common.control.ICancelable
,org.api4.java.common.control.ILoggingCustomizable
,org.api4.java.common.event.IEventEmitter<java.lang.Object>
,org.api4.java.common.event.IRelaxedEventEmitter
public class DepthFirstSearch<N,A> extends AAnyPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>,N,A> implements org.api4.java.common.control.ILoggingCustomizable
-
-
Constructor Summary
Constructors Constructor Description DepthFirstSearch(org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A> problem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.api4.java.datastructure.graph.ILabeledPath<N,A>
getCurrentPath()
int[]
getDecisionIndicesForCurrentPath()
java.lang.String
getLoggerName()
org.api4.java.algorithm.events.IAlgorithmEvent
nextWithException()
void
setCurrentPath(int... decisions)
void
setCurrentPath(org.api4.java.datastructure.graph.ILabeledPath<N,A> path)
void
setLoggerName(java.lang.String name)
-
Methods inherited from class ai.libs.jaicore.search.core.interfaces.AAnyPathInORGraphSearch
getGraphGenerator, registerSolution
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.ASolutionCandidateIterator
call, collectAllSolutions, nextSolutionCandidate, nextSolutionCandidateEvent
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.AAlgorithm
activate, announceTimeoutDetected, avoidReinterruptionOnShutdownOnCurrentThread, cancel, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, getConfig, getDeadline, getId, getInput, getListeners, getNumCPUs, getRemainingTimeToDeadline, getState, getTimeout, getTimeoutPrecautionOffset, hasNext, hasThreadBeenInterruptedDuringShutdown, interruptThreadAsPartOfShutdown, isCanceled, isShutdownInitialized, isStopCriterionSatisfied, isTimeoutDefined, isTimeouted, iterator, next, post, registerActiveThread, registerListener, resolveShutdownInterruptOnCurrentThread, setConfig, setDeadline, setMaxNumThreads, setNumCPUs, setState, setTimeout, setTimeout, setTimeoutPrecautionOffset, shutdown, terminate, unregisterActiveThread, unregisterThreadAndShutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.api4.java.algorithm.IAlgorithm
call, getConfig, getId, getInput, getNumCPUs, getTimeout, registerListener, setMaxNumThreads, setNumCPUs, setTimeout, setTimeout
-
-
-
-
Method Detail
-
nextWithException
public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException() throws java.lang.InterruptedException, org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException, org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException, org.api4.java.algorithm.exceptions.AlgorithmException
- Specified by:
nextWithException
in interfaceorg.api4.java.algorithm.IAlgorithm<N,A>
- Throws:
java.lang.InterruptedException
org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
org.api4.java.algorithm.exceptions.AlgorithmException
-
getDecisionIndicesForCurrentPath
public int[] getDecisionIndicesForCurrentPath()
-
setCurrentPath
public void setCurrentPath(org.api4.java.datastructure.graph.ILabeledPath<N,A> path)
-
setCurrentPath
public void setCurrentPath(int... decisions)
-
setLoggerName
public void setLoggerName(java.lang.String name)
- Specified by:
setLoggerName
in interfaceorg.api4.java.common.control.ILoggingCustomizable
- Overrides:
setLoggerName
in classAAnyPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>,N,A>
-
getLoggerName
public java.lang.String getLoggerName()
- Specified by:
getLoggerName
in interfaceorg.api4.java.common.control.ILoggingCustomizable
- Overrides:
getLoggerName
in classAAnyPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,A>,SearchGraphPath<N,A>,N,A>
-
-