public class Diff extends Constraint implements UsesQueueVariable, Stateful, SatisfiedPresent
| Modifier and Type | Field and Description |
|---|---|
protected Function<Integer,Comparator<org.jacop.constraints.IntRectangle>> |
dimIthMinComparator |
Rectangle[] |
rectangles
It specifies the list of rectangles which are of interest for this diff constraint.
|
protected static boolean |
trace |
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scopequeueIndex| Modifier | Constructor and Description |
|---|---|
protected |
Diff() |
|
Diff(IntVar[][] rectangles)
It specifies a diff constraint.
|
|
Diff(IntVar[][] rectangles,
boolean profile)
It specifies a diff constraint.
|
|
Diff(IntVar[] origin1,
IntVar[] origin2,
IntVar[] length1,
IntVar[] length2)
It constructs a diff constraint.
|
|
Diff(IntVar[] o1,
IntVar[] o2,
IntVar[] l1,
IntVar[] l2,
boolean profile)
It constructs a diff constraint.
|
|
Diff(List<? extends IntVar> o1,
List<? extends IntVar> o2,
List<? extends IntVar> l1,
List<? extends IntVar> l2)
It constructs a diff constraint.
|
|
Diff(List<? extends IntVar> o1,
List<? extends IntVar> o2,
List<? extends IntVar> l1,
List<? extends IntVar> l2,
boolean profile)
It constructs a diff constraint.
|
|
Diff(List<? extends List<? extends IntVar>> rectangles)
It specifies a diffn constraint.
|
|
Diff(List<? extends List<? extends IntVar>> rectangles,
boolean profile)
It specifies a diff constraint.
|
|
Diff(Rectangle[] rectangles,
boolean doProfile)
It specifies a diff constraint.
|
| 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 |
queueVariable(int level,
Var V)
This is a function called to indicate which variable in a scope of
constraint has changed.
|
void |
removeLevel(int level)
This function is called in case of the backtrack, so a constraint can
clear the queue of changed variables which is no longer valid.
|
boolean |
satisfied()
It checks if the constraint is satisfied.
|
String |
toString()
It produces a string representation of a constraint state.
|
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, impose, imposeDecomposition, increaseWeight, intArrayToString, long2int, numberArgs, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGroundedauxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisStatefulprotected static final boolean trace
public Rectangle[] rectangles
protected Function<Integer,Comparator<org.jacop.constraints.IntRectangle>> dimIthMinComparator
protected Diff()
public Diff(Rectangle[] rectangles, boolean doProfile)
rectangles - list of rectangles which can not overlap in at least one dimension.doProfile - should the constraint compute and use the profile functionality.public Diff(IntVar[][] rectangles)
rectangles - list of rectangles which can not overlap in at least one dimension.public Diff(IntVar[] o1, IntVar[] o2, IntVar[] l1, IntVar[] l2, boolean profile)
o1 - list of variables denoting origin of the rectangle in the first dimension.o2 - list of variables denoting origin of the rectangle in the second dimension.l1 - list of variables denoting length of the rectangle in the first dimension.l2 - list of variables denoting length of the rectangle in the second dimension.profile - it specifies if the profile should be computed and used.public Diff(IntVar[] origin1, IntVar[] origin2, IntVar[] length1, IntVar[] length2)
origin1 - list of variables denoting origin of the rectangle in the first dimension.origin2 - list of variables denoting origin of the rectangle in the second dimension.length1 - list of variables denoting length of the rectangle in the first dimension.length2 - list of variables denoting length of the rectangle in the second dimension.public Diff(List<? extends List<? extends IntVar>> rectangles)
rectangles - list of rectangles which can not overlap in at least one dimension.public Diff(List<? extends List<? extends IntVar>> rectangles, boolean profile)
profile - specifies is the profiles are used.rectangles - list of rectangles which can not overlap in at least one dimension.public Diff(List<? extends IntVar> o1, List<? extends IntVar> o2, List<? extends IntVar> l1, List<? extends IntVar> l2)
o1 - list of variables denoting origin of the rectangle in the first dimension.o2 - list of variables denoting origin of the rectangle in the second dimension.l1 - list of variables denoting length of the rectangle in the first dimension.l2 - list of variables denoting length of the rectangle in the second dimension.public Diff(List<? extends IntVar> o1, List<? extends IntVar> o2, List<? extends IntVar> l1, List<? extends IntVar> l2, boolean profile)
o1 - list of variables denoting origin of the rectangle in the first dimension.o2 - list of variables denoting origin of the rectangle in the second dimension.l1 - list of variables denoting length of the rectangle in the first dimension.l2 - list of variables denoting length of the rectangle in the second dimension.profile - it specifies if the profile should be computed and used.public Diff(IntVar[][] rectangles, boolean profile)
profile - specifies is the profiles are used.rectangles - list of rectangles which can not overlap in at least one dimension.public void removeLevel(int level)
StatefulremoveLevel in interface Statefullevel - the level which is being removed.public void consistency(Store store)
Constraintconsistency in class Constraintstore - constraint store within which the constraint consistency is being checked.public int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent in class Constraintpublic 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 boolean satisfied()
SatisfiedPresentImplementations of this interface for constraints that are not PrimitiveConstraint may require constraint imposition and consistency check as a requirement to work correctly.
satisfied in interface SatisfiedPresentpublic String toString()
ConstrainttoString in class ConstraintCopyright © 2022. All rights reserved.