Package org.qdl_lang.evaluate
Class TMathEvaluator
- java.lang.Object
-
- org.qdl_lang.evaluate.AbstractEvaluator
-
- org.qdl_lang.evaluate.TMathEvaluator
-
- All Implemented Interfaces:
Serializable
,EvaluatorInterface
public class TMathEvaluator extends AbstractEvaluator
Class for transcendental functions, like log, exponentiation etc.Created by Jeff Gaynor
on 3/18/21 at 6:27 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.qdl_lang.evaluate.AbstractEvaluator
AbstractEvaluator.CommonKeyIterator, AbstractEvaluator.fPointer, AbstractEvaluator.fpResult
-
-
Field Summary
-
Fields inherited from class org.qdl_lang.evaluate.AbstractEvaluator
bigArgList, bigArgList0, FILE_OP_AUTO, FILE_OP_BINARY, FILE_OP_INPUT_STREAM, FILE_OP_TEXT_INI, FILE_OP_TEXT_STEM, FILE_OP_TEXT_STRING, FILE_OP_TEXT_WITHOUT_LIST_INI, fNames, MAX_ARG_COUNT
-
Fields inherited from interface org.qdl_lang.evaluate.EvaluatorInterface
UNKNOWN_VALUE
-
-
Constructor Summary
Constructors Constructor Description TMathEvaluator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
dispatch(Polyad polyad, State state)
Does the actual evaluation of thePolyad
.String[]
getFunctionNames()
String
getNamespace()
static BigDecimal
getNaturalLogBase(MathContext mathContext)
static BigDecimal
getPi(MathContext mathContext)
int
getType(String name)
static void
setNaturalLogBase(BigDecimal naturalLogBase)
static void
setPi(BigDecimal newPI)
Pi can be set to null if the precision changes, triggering a recompute.-
Methods inherited from class org.qdl_lang.evaluate.AbstractEvaluator
areAllBigDecimals, areAllBoolean, areAllLongs, areAllNumbers, areAllSets, areAllStems, areAllStrings, areAnyBigDecimals, areNoneStems, bdEquals, checkNull, checkNull, convertArgsToStem, evaluate, evaluate, finishExpr, getBigArgList, getBigArgList0, getCommonKeys, getFQFunctionNames, getFunctionReferenceNode, getFunctionReferenceNode, getOperator, getOrCreateStem, isBigDecimal, isBoolean, isBuiltInFunction, isFunctionRef, isLong, isNumber, isScalar, isSet, isStem, isStemList, isString, listFunctions, process1, process2, process2, process3, processSet1, processSet2, processSet2, processStem1, processStem2, processStem3, resolveResourceToFile, tempFname, toBD, toConstants, toStem
-
-
-
-
Field Detail
-
TMATH_NAMESPACE
public static final String TMATH_NAMESPACE
- See Also:
- Constant Field Values
-
TMATH_FUNCTION_BASE_VALUE
public static final int TMATH_FUNCTION_BASE_VALUE
- See Also:
- Constant Field Values
-
PI
public static final String PI
- See Also:
- Constant Field Values
-
PI2
public static final String PI2
- See Also:
- Constant Field Values
-
PI_TYPE
public static final int PI_TYPE
- See Also:
- Constant Field Values
-
COSINE
public static final String COSINE
- See Also:
- Constant Field Values
-
COSINE_TYPE
public static final int COSINE_TYPE
- See Also:
- Constant Field Values
-
ARC_COSINE
public static final String ARC_COSINE
- See Also:
- Constant Field Values
-
ARC_COSINE_TYPE
public static final int ARC_COSINE_TYPE
- See Also:
- Constant Field Values
-
SINE
public static final String SINE
- See Also:
- Constant Field Values
-
SINE_TYPE
public static final int SINE_TYPE
- See Also:
- Constant Field Values
-
ARC_SINE
public static final String ARC_SINE
- See Also:
- Constant Field Values
-
ARC_SINE_TYPE
public static final int ARC_SINE_TYPE
- See Also:
- Constant Field Values
-
TANGENT
public static final String TANGENT
- See Also:
- Constant Field Values
-
TANGENT_TYPE
public static final int TANGENT_TYPE
- See Also:
- Constant Field Values
-
ARC_TANGENT
public static final String ARC_TANGENT
- See Also:
- Constant Field Values
-
ARC_TANGENT_TYPE
public static final int ARC_TANGENT_TYPE
- See Also:
- Constant Field Values
-
SINH
public static final String SINH
- See Also:
- Constant Field Values
-
SINH_TYPE
public static final int SINH_TYPE
- See Also:
- Constant Field Values
-
ARC_SINH
public static final String ARC_SINH
- See Also:
- Constant Field Values
-
ARC_SINH_TYPE
public static final int ARC_SINH_TYPE
- See Also:
- Constant Field Values
-
COSH
public static final String COSH
- See Also:
- Constant Field Values
-
COSH_TYPE
public static final int COSH_TYPE
- See Also:
- Constant Field Values
-
ARC_COSH
public static final String ARC_COSH
- See Also:
- Constant Field Values
-
ARC_COSH_TYPE
public static final int ARC_COSH_TYPE
- See Also:
- Constant Field Values
-
TANH
public static final String TANH
- See Also:
- Constant Field Values
-
TANH_TYPE
public static final int TANH_TYPE
- See Also:
- Constant Field Values
-
ARC_TANH
public static final String ARC_TANH
- See Also:
- Constant Field Values
-
ARC_TANH_TYPE
public static final int ARC_TANH_TYPE
- See Also:
- Constant Field Values
-
LOG_E
public static final String LOG_E
- See Also:
- Constant Field Values
-
LOG_E_TYPE
public static final int LOG_E_TYPE
- See Also:
- Constant Field Values
-
LOG_10
public static final String LOG_10
- See Also:
- Constant Field Values
-
LOG_10__TYPE
public static final int LOG_10__TYPE
- See Also:
- Constant Field Values
-
EXP
public static final String EXP
- See Also:
- Constant Field Values
-
EXP_TYPE
public static final int EXP_TYPE
- See Also:
- Constant Field Values
-
N_ROOT
public static final String N_ROOT
- See Also:
- Constant Field Values
-
N_ROOT_TYPE
public static final int N_ROOT_TYPE
- See Also:
- Constant Field Values
-
FLOOR
public static final String FLOOR
- See Also:
- Constant Field Values
-
FLOOR_TYPE
public static final int FLOOR_TYPE
- See Also:
- Constant Field Values
-
CEILING
public static final String CEILING
- See Also:
- Constant Field Values
-
CEILING_TYPE
public static final int CEILING_TYPE
- See Also:
- Constant Field Values
-
GCD
public static final String GCD
- See Also:
- Constant Field Values
-
GCD_TYPE
public static final int GCD_TYPE
- See Also:
- Constant Field Values
-
LCM
public static final String LCM
- See Also:
- Constant Field Values
-
LCM_TYPE
public static final int LCM_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNamespace
public String getNamespace()
-
getFunctionNames
public String[] getFunctionNames()
- Specified by:
getFunctionNames
in classAbstractEvaluator
-
getPi
public static BigDecimal getPi(MathContext mathContext)
-
setPi
public static void setPi(BigDecimal newPI)
Pi can be set to null if the precision changes, triggering a recompute. However, it cannot be actually gotten without a context.- Parameters:
newPI
-
-
getNaturalLogBase
public static BigDecimal getNaturalLogBase(MathContext mathContext)
-
setNaturalLogBase
public static void setNaturalLogBase(BigDecimal naturalLogBase)
-
dispatch
public boolean dispatch(Polyad polyad, State state)
Description copied from class:AbstractEvaluator
Does the actual evaluation of thePolyad
.- Specified by:
dispatch
in classAbstractEvaluator
- Returns:
-
getType
public int getType(String name)
-
-