public class Element extends Constraint implements UsesQueueVariable
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, tracequeueIndex| Constructor and Description |
|---|
Element(IntVar index,
int[] values,
IntVar value)
Deprecated.
|
Element(IntVar index,
int[] values,
IntVar value,
int shift)
Deprecated.
|
Element(IntVar index,
IntVar[] variables,
IntVar value)
Deprecated.
|
Element(IntVar index,
IntVar[] variables,
IntVar value,
int shift)
Deprecated.
|
Element(IntVar index,
List<? extends IntVar> variables,
IntVar value)
Deprecated.
|
Element(IntVar index,
List<? extends IntVar> variables,
IntVar value,
int shift)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Var> |
arguments()
It returns the variables in a scope of the constraint.
|
static Constraint |
choose(IntVar index,
int[] values,
IntVar value)
It constructs element constraint based on variables.
|
static Constraint |
choose(IntVar index,
int[] values,
IntVar value,
int shift)
It constructs element constraint based on variables.
|
static Constraint |
choose(IntVar index,
IntVar[] variables,
IntVar value)
It constructs element constraint based on variables.
|
static Constraint |
choose(IntVar index,
IntVar[] variables,
IntVar value,
int shift)
It constructs element constraint based on variables.
|
static Constraint |
choose(IntVar index,
List<? extends IntVar> variables,
IntVar value)
It constructs element constraint based on variables.
|
static Constraint |
choose(IntVar index,
List<? extends IntVar> variables,
IntVar value,
int shift)
It constructs element constraint based on variables.
|
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.
|
int |
getDefaultConsistencyPruningEvent() |
String |
id()
It gives the id string of a constraint.
|
void |
impose(Store store)
It imposes the constraint in a given store.
|
void |
increaseWeight()
It increases the weight of the variables in the constraint scope.
|
void |
queueVariable(int level,
Var V)
This is a function called to indicate which variable in a scope of
constraint has changed.
|
void |
removeConstraint()
It removes the constraint by removing this constraint from all variables.
|
String |
toString()
It produces a string representation of a constraint state.
|
afc, cleanAfterFailure, decompose, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, impose, imposeDecomposition, intArrayToString, long2int, numberArgs, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGroundedauxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition@Deprecated public Element(IntVar index, List<? extends IntVar> variables, IntVar value)
index - index variable.variables - list of variables.value - variable to which index variable is equal to.@Deprecated public Element(IntVar index, List<? extends IntVar> variables, IntVar value, int shift)
index - index variable.variables - variables list.value - value variable.shift - shift by which the index value is moved to the left.@Deprecated public Element(IntVar index, int[] values, IntVar value)
index - index variable.values - list of integers.value - variable to which index variable is equal to.@Deprecated public Element(IntVar index, int[] values, IntVar value, int shift)
index - index variable.values - integer list.value - value variable.shift - shift by which the index value is moved to the left.@Deprecated public Element(IntVar index, IntVar[] variables, IntVar value)
index - index variable.variables - list of integers.value - variable to which index variable is equal to.@Deprecated public Element(IntVar index, IntVar[] variables, IntVar value, int shift)
index - index variable.variables - variables list.value - value variable.shift - shift by which the index value is moved to the left.public Set<Var> arguments()
Constraintarguments in class Constraintpublic void consistency(Store store)
Constraintconsistency in class Constraintstore - constraint store within which the constraint consistency is being checked.public int getConsistencyPruningEvent(Var var)
ConstraintgetConsistencyPruningEvent in class Constraintvar - variable for which pruning event is retrievedpublic int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent in class Constraintpublic String id()
Constraintid in class Constraintpublic void impose(Store store)
Constraintimpose in class Constraintstore - the constraint store to which the constraint is imposed to.public void queueVariable(int level,
Var V)
ConstraintqueueVariable in class Constraintlevel - the level of the store at which the change has occurred.V - variable which has changed.public void removeConstraint()
ConstraintremoveConstraint in class Constraintpublic String toString()
ConstrainttoString in class Constraintpublic void increaseWeight()
ConstraintincreaseWeight in class Constraintpublic static Constraint choose(IntVar index, List<? extends IntVar> variables, IntVar value)
index - index variable.variables - list of variables.value - variable to which index variable is equal to.public static Constraint choose(IntVar index, List<? extends IntVar> variables, IntVar value, int shift)
index - index variable.variables - variables list.value - value variable.shift - shift by which the index value is moved to the left.public static Constraint choose(IntVar index, int[] values, IntVar value)
index - index variable.values - list of integers.value - variable to which index variable is equal to.public static Constraint choose(IntVar index, int[] values, IntVar value, int shift)
index - index variable.values - integer list.value - value variable.shift - shift by which the index value is moved to the left.public static Constraint choose(IntVar index, IntVar[] variables, IntVar value)
index - index variable.variables - list of integers.value - variable to which index variable is equal to.public static Constraint choose(IntVar index, IntVar[] variables, IntVar value, int shift)
index - index variable.variables - variables list.value - value variable.shift - shift by which the index value is moved to the left.Copyright © 2022. All rights reserved.