public class Alldiff extends Alldifferent
It extends basic functionality of Alldifferent constraint.
grounded, list, positionMapping
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace
queueIndex
Modifier | Constructor and Description |
---|---|
protected |
Alldiff() |
|
Alldiff(IntVar[] variables)
It constructs the alldiff constraint for the supplied variable.
|
|
Alldiff(List<? extends IntVar> variables)
It constructs the alldiff constraint for the supplied variable.
|
Modifier and Type | Method and Description |
---|---|
void |
consistency(Store store)
It is a (most probably incomplete) consistency function which removes the
values from variables domains.
|
int |
getDefaultConsistencyPruningEvent() |
void |
impose(Store store)
It imposes the constraint in a given store.
|
void |
queueVariable(int level,
Var var)
This is a function called to indicate which variable in a scope of
constraint has changed.
|
String |
toString()
It produces a string representation of a constraint state.
|
notSatisfied, satisfied
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, imposeDecomposition, increaseWeight, intArrayToString, long2int, numberArgs, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGrounded
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
protected Alldiff()
public Alldiff(IntVar[] variables)
variables
- variables which are constrained to take different values.public int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent
in class Alldifferent
public void impose(Store store)
Constraint
impose
in class Alldifferent
store
- the constraint store to which the constraint is imposed to.public void consistency(Store store)
Constraint
consistency
in class Alldifferent
store
- constraint store within which the constraint consistency is being checked.public String toString()
Constraint
toString
in class Alldifferent
public void queueVariable(int level, Var var)
Constraint
queueVariable
in class Alldifferent
level
- the level of the store at which the change has occurred.var
- variable which has changed.Copyright © 2022. All rights reserved.