|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.search.MinDomainOverDegree<T>
T - type of variable being compared.public class MinDomainOverDegree<T extends Var>
Defines a MinDomainOverDegree comparator for Variables.
| Constructor Summary | |
|---|---|
MinDomainOverDegree()
It constructs variable comparator with priority based on the minimal value of domain size divided by the number of constraints currently attached to a variable. |
|
| Method Summary | |
|---|---|
int |
compare(float left,
T var)
It compares the baseline metric to the variable metric. |
int |
compare(T leftVar,
T rightVar)
It compares the metric of the left variable against the right one. |
float |
metric(T var)
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 MinDomainOverDegree()
| Method Detail |
|---|
public int compare(float left,
T var)
ComparatorVariable
compare in interface ComparatorVariable<T extends Var>left - the baseline for comparison.var - variable which is compared to baseline.
public int compare(T leftVar,
T rightVar)
ComparatorVariable
compare in interface ComparatorVariable<T extends Var>leftVar - left variablerightVar - right variable
public float metric(T var)
ComparatorVariable
metric in interface ComparatorVariable<T extends Var>var - variable for which metric is computed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||