public class SimpleFunction extends Function
config, mathCompare, valueType
Constructor and Description |
---|
SimpleFunction()
Create a new instance of SimpleFunction.
|
SimpleFunction(java.lang.String thisValueType,
java.util.HashMap thisConfig)
Create a new instance of SimpleFunction.
|
SimpleFunction(java.lang.String thisValueType,
int minValue,
int maxValue)
Create a new instance of SimpleFunction.
|
Modifier and Type | Method and Description |
---|---|
ReplySet |
evaluate(MetricDataset dataset)
Return a value based on the function evaluation.
|
protected void |
initialise()
Initialise the function values, setting the config parameters or other.
|
Function |
newInstance()
Create and return a new instance of the function, initialised with this function's
value type
valueType and math evaluator mathCompare . |
checkValueType, createFunction, createFunction, createFunction, getConfigParams, innerObject, isLegalNumber, setConfigParams, setEvaluator, setValueType
public SimpleFunction() throws java.lang.Exception
java.lang.Exception
- any error.public SimpleFunction(java.lang.String thisValueType, int minValue, int maxValue) throws java.lang.Exception
mathCompare
evaluator is set to SimpleMathCompare
.
To change this, use the setEvaluator
method.thisValueType
- type the type of object being evaluated.minValue
- the minimum value for the parameter.maxValue
- the maximum value for the parameter.java.lang.Exception
- any error.public SimpleFunction(java.lang.String thisValueType, java.util.HashMap thisConfig) throws java.lang.Exception
mathCompare
evaluator is set to SimpleMathCompare
.
To change this, use the setEvaluator
method.thisValueType
- type the type of object being evaluated.thisConfig
- configuration parameters. This should include
AiHeuristicConst
.MAX
and MIN
values.java.lang.Exception
- any error.protected void initialise() throws java.lang.Exception
initialise
in class Function
java.lang.Exception
- any error.public ReplySet evaluate(MetricDataset dataset) throws java.lang.Exception
evaluate
in interface FunctionDef
evaluate
in class Function
dataset
- the value to pass through the function.Double
.java.lang.Exception
- any error.public Function newInstance() throws java.lang.Exception
valueType
and math evaluator mathCompare
.java.lang.Exception
- any error.