Class 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.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
      • Methods inherited from interface org.api4.java.common.control.ICancelable

        cancel
      • Methods inherited from interface org.api4.java.algorithm.ISolutionCandidateIterator

        nextSolutionCandidate, nextSolutionCandidateEvent
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Constructor Detail

      • DepthFirstSearch

        public DepthFirstSearch​(org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A> problem)
    • 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 interface org.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
      • getCurrentPath

        public org.api4.java.datastructure.graph.ILabeledPath<N,​A> getCurrentPath()
      • 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 interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        setLoggerName in class AAnyPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​SearchGraphPath<N,​A>,​N,​A>
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        getLoggerName in class AAnyPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​SearchGraphPath<N,​A>,​N,​A>