public class FunctionSymmetricHardLimit extends FunctionActivate
1.0
of the value is larger than a threshold and -1.0
otherwise. The threshold should be added as a config parameter with the key value
AiHeuristicConst
.SHLT
. Only the first dataset value is retrieved and measured.
This is added as part of the som package, copied from the related source code.config, mathCompare, valueType
Constructor and Description |
---|
FunctionSymmetricHardLimit()
Create a new instance of FunctionSymmetricHardLimit.
|
FunctionSymmetricHardLimit(java.lang.String thisValueType,
java.util.HashMap<java.lang.String,?> thisConfig)
Create a new instance of FunctionSymmetricHardLimit.
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double value,
double threshold)
Return a value based on the function evaluation.
|
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 . |
evaluateSingle
checkValueType, createFunction, createFunction, createFunction, getConfigParams, innerObject, isLegalNumber, setConfigParams, setEvaluator, setValueType
public FunctionSymmetricHardLimit() throws java.lang.Exception
java.lang.Exception
- any error.public FunctionSymmetricHardLimit(java.lang.String thisValueType, java.util.HashMap<java.lang.String,?> thisConfig) throws java.lang.Exception
thisValueType
- the type of object being evaluated.thisConfig
- list of initialisation function-specific parameters.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 FunctionSingle
dataset
- a dataset with the value to evaluate, plus any parameters.java.lang.Exception
- any error.public double evaluate(double value, double threshold) throws java.lang.Exception
value
- the value to evaluate.threshold
- the threshold.java.lang.Exception
- any error.public Function newInstance() throws java.lang.Exception
valueType
and math evaluator mathCompare
.java.lang.Exception
- any error.