Class ExpressionOptimizer


  • public class ExpressionOptimizer
    extends java.lang.Object
    This class will perform various optimizations on the ranking expressions. Clients using optimized expressions will do // Set up once RankingExpression expression = new RankingExpression(myExpressionString); ArrayContext context = new ArrayContext(expression); new ExpressionOptimizer().optimize(expression, context); // Execute repeatedly context.put("featureName1", value1); ... expression.evaluate(context); // Note that the expression may be used by multiple threads at the same time, while the // context is single-threaded. To create a context for another tread, use the above context as a prototype, // contextForOtherThread = context.clone();

    Instances of this class are not multithread safe.

    Author:
    bratseth