|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.constraints.DecomposedConstraint
JaCoP.constraints.Constraint
JaCoP.constraints.Alldifferent
JaCoP.constraints.Alldiff
public class Alldiff
Alldiff constraint assures that all FDVs has different values. It uses bounds consistency technique as described in the paper by J.-F. Puget, "A fast algorithm for the bound consistency of alldiff constraints", in Proceedings of the Fifteenth National Conference on Artificial Intelligence (AAAI '98), 1998. It implements the method with time complexity O(n^2). Before using bounds consistency it calls consistency method from Alldifferent constraint. It extends basic functionality of Alldifferent constraint.
| Field Summary | |
|---|---|
static java.lang.String[] |
xmlAttributes
It specifies the arguments required to be saved by an XML format as well as the constructor being called to recreate an object from an XML format. |
| Fields inherited from class JaCoP.constraints.Alldifferent |
|---|
list |
| Fields inherited from class JaCoP.constraints.Constraint |
|---|
atomicExecution, consistencyPruningEvents, earlyTerminationOK, id, increaseWeight, numberArgs, numberId |
| Fields inherited from class JaCoP.constraints.DecomposedConstraint |
|---|
queueIndex |
| Constructor Summary | |
|---|---|
Alldiff(java.util.ArrayList<? extends IntVar> variables)
It constructs the alldiff constraint for the supplied variable. |
|
Alldiff(IntVar[] variables)
It constructs the alldiff constraint for the supplied variable. |
|
| Method Summary | |
|---|---|
void |
consistency(Store store)
It is a (most probably incomplete) consistency function which removes the values from variables domains. |
int |
getConsistencyPruningEvent(Var var)
It retrieves the pruning event which causes reevaluation of the constraint. |
java.lang.String |
id()
It gives the id string of a constraint. |
void |
impose(Store store)
It imposes the constraint in a given store. |
java.lang.String |
toString()
It produces a string representation of a constraint state. |
| Methods inherited from class JaCoP.constraints.Alldifferent |
|---|
arguments, increaseWeight, queueVariable, removeConstraint, satisfied |
| Methods inherited from class JaCoP.constraints.Constraint |
|---|
cleanAfterFailure, decompose, getGuideConstraint, getGuideValue, getGuideVariable, impose, imposeDecomposition, numberArgs, removeLevel, removeLevelLate, requiresMonotonicity, setConsistencyPruningEvent, supplyGuideFeedback |
| Methods inherited from class JaCoP.constraints.DecomposedConstraint |
|---|
auxiliaryVariables, imposeDecomposition |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String[] xmlAttributes
| Constructor Detail |
|---|
public Alldiff(IntVar[] variables)
variables - variables which are constrained to take different values.public Alldiff(java.util.ArrayList<? extends IntVar> variables)
variables - variables which are constrained to take different values.| Method Detail |
|---|
public int getConsistencyPruningEvent(Var var)
Constraint
getConsistencyPruningEvent in class Alldifferentvar - variable for which pruning event is retrieved
public java.lang.String id()
Constraint
id in class Alldifferentpublic void impose(Store store)
Constraint
impose in class Alldifferentstore - the constraint store to which the constraint is imposed to.public void consistency(Store store)
Constraint
consistency in class Alldifferentstore - constraint store within which the constraint consistency is being checked.public java.lang.String toString()
Constraint
toString in class Alldifferent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||