Class TurboEvaluatorFactory

java.lang.Object
com.github.gbenroscience.parser.turbo.tools.TurboEvaluatorFactory

public class TurboEvaluatorFactory extends Object
Author:
GBEMIRO
  • Constructor Details

    • TurboEvaluatorFactory

      public TurboEvaluatorFactory()
  • Method Details

    • getCompiler

      public static TurboExpressionEvaluator getCompiler(MathExpression me)
      Intelligently selects and returns the best Turbo engine for the expression.
      Parameters:
      me - The MathExpression
      Returns:
      A TurboExpressionEvaluator that can be used to evaluate expressions at turbo speed
    • getCompiler

      public static TurboExpressionEvaluator getCompiler(MathExpression me, boolean useWideningVarsPassing)
      Parameters:
      me - The root MathExpression
      useWideningVarsPassing - If true, will create a turbo evaluator that uses widening to pass variables, else it uses an array based approach. If you are not sure, if your expression has more than 63 unique variables, definitely set this variable to false. Else test with true or false for your particular expression and see which has higher performance. They usually give performances within 1-20ns of each other.
      Returns:
      A TurboExpressionEvaluator that can be used to evaluate expressions at turbo speed
    • createMatrixLeaf

      public static MethodHandle createMatrixLeaf(String symbol)