Class TurboEvaluatorFactory
java.lang.Object
com.github.gbenroscience.parser.turbo.tools.TurboEvaluatorFactory
- Author:
- GBEMIRO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MethodHandlecreateMatrixLeaf(String symbol) static TurboExpressionEvaluatorIntelligently selects and returns the best Turbo engine for the expression.static TurboExpressionEvaluatorgetCompiler(MathExpression me, boolean useWideningVarsPassing)
-
Constructor Details
-
TurboEvaluatorFactory
public TurboEvaluatorFactory()
-
-
Method Details
-
getCompiler
Intelligently selects and returns the best Turbo engine for the expression.- Parameters:
me- TheMathExpression- Returns:
- A
TurboExpressionEvaluatorthat can be used to evaluate expressions at turbo speed
-
getCompiler
public static TurboExpressionEvaluator getCompiler(MathExpression me, boolean useWideningVarsPassing) - Parameters:
me- The root MathExpressionuseWideningVarsPassing- 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
TurboExpressionEvaluatorthat can be used to evaluate expressions at turbo speed
-
createMatrixLeaf
-