Class DecoratingNodeEvaluator<N,​A,​V extends java.lang.Comparable<V>>

  • All Implemented Interfaces:
    org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.ICancelablePathEvaluator, org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPathEvaluator<N,​A,​V>, org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallyGraphDependentPathEvaluator<N,​A,​V>, org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallySolutionReportingPathEvaluator<N,​A,​V>, org.api4.java.common.attributedobjects.IGetter<org.api4.java.datastructure.graph.ILabeledPath<N,​A>,​V>, org.api4.java.common.attributedobjects.IObjectEvaluator<org.api4.java.datastructure.graph.ILabeledPath<N,​A>,​V>, org.api4.java.common.control.ILoggingCustomizable
    Direct Known Subclasses:
    AlternativeNodeEvaluator, DelayingNodeEvaluator, TimeLoggingNodeEvaluator

    public abstract class DecoratingNodeEvaluator<N,​A,​V extends java.lang.Comparable<V>>
    extends java.lang.Object
    implements org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPathEvaluator<N,​A,​V>, org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.ICancelablePathEvaluator, org.api4.java.common.control.ILoggingCustomizable, org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallyGraphDependentPathEvaluator<N,​A,​V>, org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallySolutionReportingPathEvaluator<N,​A,​V>
    • Constructor Detail

      • DecoratingNodeEvaluator

        public DecoratingNodeEvaluator​(org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPathEvaluator<N,​A,​V> evaluator)
    • Method Detail

      • getEvaluator

        public org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPathEvaluator<N,​A,​V> getEvaluator()
      • evaluate

        public V evaluate​(org.api4.java.datastructure.graph.ILabeledPath<N,​A> node)
                   throws org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.PathEvaluationException,
                          java.lang.InterruptedException
        Specified by:
        evaluate in interface org.api4.java.common.attributedobjects.IObjectEvaluator<N,​A>
        Specified by:
        evaluate in interface org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPathEvaluator<N,​A,​V extends java.lang.Comparable<V>>
        Throws:
        org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.PathEvaluationException
        java.lang.InterruptedException
      • isDecoratedEvaluatorCancelable

        public boolean isDecoratedEvaluatorCancelable()
      • isDecoratedEvaluatorGraphDependent

        public boolean isDecoratedEvaluatorGraphDependent()
      • doesDecoratedEvaluatorReportSolutions

        public boolean doesDecoratedEvaluatorReportSolutions()
      • requiresGraphGenerator

        public boolean requiresGraphGenerator()
        default implementation that is just correct with respect to the decorated node evaluator. If the node evaluator that inherits from DecoratingNodeEvaluator itself may require the graph, this method should be overwritten.
        Specified by:
        requiresGraphGenerator in interface org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallyGraphDependentPathEvaluator<N,​A,​V extends java.lang.Comparable<V>>
      • reportsSolutions

        public boolean reportsSolutions()
        default implementation that is just correct with respect to the decorated node evaluator. If the node evaluator that inherits from DecoratingNodeEvaluator itself may be solution reporting, this method should be overwritten.
        Specified by:
        reportsSolutions in interface org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallySolutionReportingPathEvaluator<N,​A,​V extends java.lang.Comparable<V>>
      • setGenerator

        public void setGenerator​(org.api4.java.datastructure.graph.implicit.IGraphGenerator<N,​A> generator,
                                 org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester<N,​A> goalTester)
        Specified by:
        setGenerator in interface org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallyGraphDependentPathEvaluator<N,​A,​V extends java.lang.Comparable<V>>
      • registerSolutionListener

        public void registerSolutionListener​(java.lang.Object listener)
        Specified by:
        registerSolutionListener in interface org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IPotentiallySolutionReportingPathEvaluator<N,​A,​V extends java.lang.Comparable<V>>
      • cancelActiveTasks

        public void cancelActiveTasks()
        Specified by:
        cancelActiveTasks in interface org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.ICancelablePathEvaluator
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
      • setLoggerName

        public void setLoggerName​(java.lang.String name)
        Specified by:
        setLoggerName in interface org.api4.java.common.control.ILoggingCustomizable