public class Element extends Constraint implements UsesQueueVariable
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace
queueIndex
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, watchedVariableGrounded
auxiliaryVariables, 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()
Constraint
arguments
in class Constraint
public void consistency(Store store)
Constraint
consistency
in class Constraint
store
- constraint store within which the constraint consistency is being checked.public int getConsistencyPruningEvent(Var var)
Constraint
getConsistencyPruningEvent
in class Constraint
var
- variable for which pruning event is retrievedpublic int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent
in class Constraint
public String id()
Constraint
id
in class Constraint
public void impose(Store store)
Constraint
impose
in class Constraint
store
- the constraint store to which the constraint is imposed to.public void queueVariable(int level, Var V)
Constraint
queueVariable
in class Constraint
level
- the level of the store at which the change has occurred.V
- variable which has changed.public void removeConstraint()
Constraint
removeConstraint
in class Constraint
public String toString()
Constraint
toString
in class Constraint
public void increaseWeight()
Constraint
increaseWeight
in class Constraint
public 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.