public abstract class PredefinedFunction extends Function
PredefinedFunction
is a Function
with a
predefined definition which can't be redefined (e.g.:
sin
, cos
, log
, etc.).
Static instances of this PredefinedFunction
represent all
possible mathematical predefined functions.Modifier and Type | Field and Description |
---|---|
static PredefinedFunction |
ATAN
This
PredefinedFunction instance represents the
atan function. |
static PredefinedFunction |
COS
This
PredefinedFunction instance represents the
cos function. |
static PredefinedFunction |
EXP
This
PredefinedFunction instance represents the
exp function. |
static PredefinedFunction[] |
FUNCTIONS
Stores all
static final PredefinedFunction instances which are
already available by this class. |
static PredefinedFunction |
LOG
This
PredefinedFunction instance represents the
log function. |
static PredefinedFunction |
SIN
This
PredefinedFunction instance represents the
sin function. |
static PredefinedFunction |
SQRT
This
PredefinedFunction instance represents the
sqrt function. |
static PredefinedFunction |
TAN
This
PredefinedFunction instance represents the
cos function. |
Modifier | Constructor and Description |
---|---|
protected |
PredefinedFunction(String name)
Instantiates a new
PredefinedFunction with the specefied
name . |
Modifier and Type | Method and Description |
---|---|
Evaluator |
getCallEvaluator(Type defaultType,
Context context)
Returns the
Evaluator for this PredefinedFunction
according to the Type the parameter will be evaluated to. |
Expression |
insertArguments(Expression param)
Returns this function dissolved.
|
getDerivative, getName, getParameter, getParameterCount, getParameterIndex, getParameters, setParameters
public static final PredefinedFunction ATAN
PredefinedFunction
instance represents the
atan
function.public static final PredefinedFunction COS
PredefinedFunction
instance represents the
cos
function.public static final PredefinedFunction EXP
PredefinedFunction
instance represents the
exp
function.public static final PredefinedFunction[] FUNCTIONS
static final PredefinedFunction
instances which are
already available by this class.public static final PredefinedFunction LOG
PredefinedFunction
instance represents the
log
function.public static final PredefinedFunction SIN
PredefinedFunction
instance represents the
sin
function.public static final PredefinedFunction SQRT
PredefinedFunction
instance represents the
sqrt
function.public static final PredefinedFunction TAN
PredefinedFunction
instance represents the
cos
function.protected PredefinedFunction(String name)
PredefinedFunction
with the specefied
name
. This Constructor is protected because all possible
PredefinedFunctions
are available as static final
fields in this class.name
- the function's name.public Evaluator getCallEvaluator(Type defaultType, Context context)
Evaluator
for this PredefinedFunction
according to the Type
the parameter will be evaluated to.
Usually the specified Context
will be the
FunctionCallEvaluator
for the
FunctionCall
"calling"
this PredefinedFunction
.Type.getEvaluator(PredefinedFunction,Evaluator)
on the Type
the parameter is evaluated to.getCallEvaluator
in class Function
defaultType
- not used in this method.context
- the FunctionCallEvaluator
for this
PredefinedFunction
call.Evaluator
for this
PredefinedFunction
.FunctionCallEvaluator.getEvaluator(Symbol)
,
Evaluator.getReturnType()
public Expression insertArguments(Expression param)
Function
insertArguments
in class Function