|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.objects.util.AggregationFunction
messif.objects.util.impl.ThresholdFunctionSimpleEvaluator
public class ThresholdFunctionSimpleEvaluator
Evaluator for basic arithmetic functions. Basic arithmetic operations (+, -, *, /) are supported as well as numeric constants (treated as floats).
Constructor Summary | |
---|---|
ThresholdFunctionSimpleEvaluator(java.lang.String function)
Creates a new instance of ThresholdFunctionSimpleEvaluator. |
Method Summary | |
---|---|
float |
compute(float... distances)
Computes the value of the aggregate distance from the provided sub-distances. |
java.lang.String[] |
getParameterNames()
Returns the names of distance parameters (i.e. the descriptor names) for the AggregationFunction.compute(float...) function. |
java.lang.String |
toString()
Returns a string representation of the encapsulated function. |
Methods inherited from class messif.objects.util.AggregationFunction |
---|
getDistance, getDistance, getFactoryClass, getParameterMaximalDistance, setFactoryClass, valueOf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThresholdFunctionSimpleEvaluator(java.lang.String function) throws java.lang.IllegalArgumentException
function
- the function string
java.lang.IllegalArgumentException
- if the specified function cannot be parsedMethod Detail |
---|
public float compute(float... distances)
AggregationFunction
distances
array items must correspond with the parameter
names as returned by AggregationFunction.getParameterNames()
.
compute
in class AggregationFunction
distances
- the distances in respective descriptors
public java.lang.String[] getParameterNames()
AggregationFunction
AggregationFunction.compute(float...)
function.
getParameterNames
in class AggregationFunction
AggregationFunction.compute(float...)
functionpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |