|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.search.MaxRegret<T>
T - variable of type IntVar.public class MaxRegret<T extends IntVar>
Defines a MaxRegret comparator for Variables.
| Constructor Summary | |
|---|---|
MaxRegret()
It constructs MaxRegret comparator. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MaxRegret()
| Method Detail |
|---|
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 variable
public float metric(T o)
ComparatorVariable
metric in interface ComparatorVariable<T extends IntVar>o - variable for which metric is computed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||