T
- variable of type FloatVar.public class MaxRegretFloat<T extends FloatVar> extends Object implements ComparatorVariable<T>
Constructor and Description |
---|
MaxRegretFloat()
It constructs MaxRegretFloat comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(double ldiff,
T var)
It compares the baseline metric to the variable metric.
|
int |
compare(T left,
T right)
It compares the metric of the left variable against the right one.
|
double |
metric(T o)
It returns the metric of the variable given according to the comparator.
|
public int compare(double ldiff, T var)
ComparatorVariable
compare
in interface ComparatorVariable<T extends FloatVar>
ldiff
- the baseline for comparison.var
- variable which is compared to baseline.public int compare(T left, T right)
ComparatorVariable
compare
in interface ComparatorVariable<T extends FloatVar>
left
- left variableright
- right variablepublic double metric(T o)
ComparatorVariable
metric
in interface ComparatorVariable<T extends FloatVar>
o
- variable for which metric is computed.Copyright © 2022. All rights reserved.