Class TimeoutableEvaluator

  • All Implemented Interfaces:
    ai.libs.jaicore.basic.IObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>, IClassifierEvaluator

    public class TimeoutableEvaluator
    extends ai.libs.jaicore.timing.TimedObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>
    implements IClassifierEvaluator
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeoutableEvaluator​(ai.libs.jaicore.basic.IObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double> iSolutionEvaluator, int timeoutInMS)
      C'tor create a timeoutable evaluator out of any other IObjectEvaluator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double evaluateSupervised​(weka.classifiers.Classifier object)  
      java.lang.String getMessage​(weka.classifiers.Classifier item)  
      long getTimeout​(weka.classifiers.Classifier item)  
      • Methods inherited from class ai.libs.jaicore.timing.TimedObjectEvaluator

        evaluate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface ai.libs.jaicore.basic.IObjectEvaluator

        evaluate
    • Constructor Detail

      • TimeoutableEvaluator

        public TimeoutableEvaluator​(ai.libs.jaicore.basic.IObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double> iSolutionEvaluator,
                                    int timeoutInMS)
        C'tor create a timeoutable evaluator out of any other IObjectEvaluator. Note that these evaluators need to check whether their thread has been interrupted to actually react on the timeout.
        Parameters:
        iSolutionEvaluator - The evaluator which shall actually be called and maybe needs to be interrupted after the given timeout.
        timeoutInMS - The timeout in milliseconds to interrupt an evaluation with the {iSolutionEvaluator}
    • Method Detail

      • evaluateSupervised

        public java.lang.Double evaluateSupervised​(weka.classifiers.Classifier object)
                                            throws ai.libs.jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException,
                                                   java.lang.InterruptedException
        Specified by:
        evaluateSupervised in class ai.libs.jaicore.timing.TimedObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>
        Throws:
        ai.libs.jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException
        java.lang.InterruptedException
      • getTimeout

        public long getTimeout​(weka.classifiers.Classifier item)
        Specified by:
        getTimeout in class ai.libs.jaicore.timing.TimedObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>
      • getMessage

        public java.lang.String getMessage​(weka.classifiers.Classifier item)
        Specified by:
        getMessage in class ai.libs.jaicore.timing.TimedObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>