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)
ComparatorVariablecompare 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)
ComparatorVariablecompare in interface ComparatorVariable<T extends IntVar>left - left variableright - right variablepublic float metric(T o)
ComparatorVariablemetric in interface ComparatorVariable<T extends IntVar>o - variable for which metric is computed.Copyright © 2016. All rights reserved.