T
- variable of type IntVar.public class MaxRegret<T extends IntVar> extends Object implements ComparatorVariable<T>
Constructor and Description |
---|
MaxRegret()
It constructs MaxRegret comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(float 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.
|
float |
metric(T o)
It returns the metric of the variable given according to the comparator.
|
public int compare(float ldiff, T var)
ComparatorVariable
compare
in interface ComparatorVariable<T extends IntVar>
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 IntVar>
left
- left variableright
- right variablepublic float metric(T o)
ComparatorVariable
metric
in interface ComparatorVariable<T extends IntVar>
o
- variable for which metric is computed.Copyright © 2015. All rights reserved.