Class ScalarTurboEvaluator
java.lang.Object
com.github.gbenroscience.parser.turbo.tools.ScalarTurboEvaluator
- All Implemented Interfaces:
TurboExpressionEvaluator
- Author:
- GBEMIRO
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intIf the number of unique variables in the expression is equal to or greater thanMIN_VAR_COUNT_FOR_ARRAY_BASED_EVALUATOR, the Array based evaluator will be used -
Constructor Summary
ConstructorsConstructorDescriptionScalarTurboEvaluator(MathExpression me, boolean useWideningVars) USE THIS ONLY IF YOU KNOW WHAT YOU ARE DOING! -
Method Summary
Modifier and TypeMethodDescriptioncompile()Compile a postfix token array into a fast-executing expression.
-
Field Details
-
MIN_VAR_COUNT_FOR_ARRAY_BASED_EVALUATOR
public static final int MIN_VAR_COUNT_FOR_ARRAY_BASED_EVALUATORIf the number of unique variables in the expression is equal to or greater thanMIN_VAR_COUNT_FOR_ARRAY_BASED_EVALUATOR, the Array based evaluator will be used- See Also:
-
MAX_ALLOWED_METHOD_ARGS_BY_JVM
public static final int MAX_ALLOWED_METHOD_ARGS_BY_JVM- See Also:
-
-
Constructor Details
-
ScalarTurboEvaluator
-
ScalarTurboEvaluator
USE THIS ONLY IF YOU KNOW WHAT YOU ARE DOING!- Parameters:
me- The rootMathExpressionuseWideningVars- If true, you want the turbo evaluator to pass the variables to the evaluator with a widening approach. If false, it will pass it with an array based approach.
-
-
Method Details
-
compile
Description copied from interface:TurboExpressionEvaluatorCompile a postfix token array into a fast-executing expression.- Specified by:
compilein interfaceTurboExpressionEvaluator- Returns:
- A FastCompositeExpression ready for evaluation
- Throws:
Throwable- if compilation fails
-
getDelegateClass
-
getDelegate
-