public class Diff2 extends Diff
Zero-width rectangles can be packed anywhere.
| Modifier and Type | Field and Description |
|---|---|
int[] |
exclusiveList
It specifies a list of pairs of rectangles which can overlap.
|
dimIthMinComparator, rectangles, traceatomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scopequeueIndex| Constructor and Description |
|---|
Diff2(IntVar[][] rectangles)
It creates a diff2 constraint.
|
Diff2(IntVar[][] rectangles,
boolean profile)
It creates a diff2 constraint.
|
Diff2(IntVar[][] rect,
List<List<Integer>> exclusive)
Conditional Diff2.
|
Diff2(IntVar[] origin1,
IntVar[] origin2,
IntVar[] length1,
IntVar[] length2)
It creates a diff2 constraint.
|
Diff2(IntVar[] o1,
IntVar[] o2,
IntVar[] l1,
IntVar[] l2,
boolean profile)
It creates a diff2 constraint.
|
Diff2(List<? extends IntVar> o1,
List<? extends IntVar> o2,
List<? extends IntVar> l1,
List<? extends IntVar> l2)
It creates a diff2 constraint.
|
Diff2(List<? extends List<? extends IntVar>> rectangles)
It creates a diff2 constraint.
|
Diff2(List<? extends List<? extends IntVar>> rectangles,
boolean profile)
It creates a diff2 constraint.
|
Diff2(List<IntVar> o1,
List<IntVar> o2,
List<IntVar> l1,
List<IntVar> l2,
boolean profile)
It creates a diff2 constraint.
|
Diff2(List<List<IntVar>> rectangles,
List<List<Integer>> exclusiveList)
Conditional Diff2.
|
Diff2(Rectangle[] rectangles,
int[] exclusiveList,
boolean doProfile)
Conditional Diff2.
|
| Modifier and Type | Method and Description |
|---|---|
void |
impose(Store store)
It imposes the constraint in a given store.
|
boolean |
satisfied()
It checks if the constraint is satisfied.
|
String |
toString()
It produces a string representation of a constraint state.
|
consistency, getDefaultConsistencyPruningEvent, queueVariable, removeLevelafc, 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, watchedVariableGroundedauxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisStatefulpublic int[] exclusiveList
public Diff2(Rectangle[] rectangles, int[] exclusiveList, boolean doProfile)
rectangles - a list of rectangles.exclusiveList - a list denoting the pair of rectangles, which can overlapdoProfile - should profile be computed and used.public Diff2(List<IntVar> o1, List<IntVar> o2, List<IntVar> l1, List<IntVar> l2, boolean profile)
o1 - list of variables denoting the origin in the first dimension.o2 - list of variables denoting the origin in the second dimension.l1 - list of variables denoting the length in the first dimension.l2 - list of variables denoting the length in the second dimension.profile - specifies if the profile should be computed.public Diff2(List<? extends List<? extends IntVar>> rectangles)
rectangles - list of rectangles with origins and lengths in both dimensions.public Diff2(List<? extends List<? extends IntVar>> rectangles, boolean profile)
rectangles - list of rectangles with origins and lengths in both dimensions.profile - specifies if the profile is computed and used.public Diff2(List<? extends IntVar> o1, List<? extends IntVar> o2, List<? extends IntVar> l1, List<? extends IntVar> l2)
o1 - list of variables denoting the origin in the first dimension.o2 - list of variables denoting the origin in the second dimension.l1 - list of variables denoting the length in the first dimension.l2 - list of variables denoting the length in the second dimension.public Diff2(IntVar[] origin1, IntVar[] origin2, IntVar[] length1, IntVar[] length2)
origin1 - list of variables denoting the origin in the first dimension.origin2 - list of variables denoting the origin in the second dimension.length1 - list of variables denoting the length in the first dimension.length2 - list of variables denoting the length in the second dimension.public Diff2(IntVar[] o1, IntVar[] o2, IntVar[] l1, IntVar[] l2, boolean profile)
o1 - list of variables denoting the origin in the first dimension.o2 - list of variables denoting the origin in the second dimension.l1 - list of variables denoting the length in the first dimension.l2 - list of variables denoting the length in the second dimension.profile - specifies if the profile should be computed.public Diff2(IntVar[][] rectangles)
rectangles - list of rectangles with origins and lengths in both dimensions.public Diff2(IntVar[][] rectangles, boolean profile)
rectangles - list of rectangles with origins and lengths in both dimensions.profile - specifies if the profile is computed and used.public Diff2(List<List<IntVar>> rectangles, List<List<Integer>> exclusiveList)
rectangles - - list of rectangles, each rectangle represented by a list of variables.exclusiveList - - list of rectangles pairs which can overlap.public Diff2(IntVar[][] rect, List<List<Integer>> exclusive)
rect - - list of rectangles, each rectangle represented by a list of variables.exclusive - - list of rectangles pairs which can overlap.public void impose(Store store)
Constraintimpose in class Constraintstore - the constraint store to which the constraint is imposed to.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 SatisfiedPresentsatisfied in class Diffpublic String toString()
ConstraintCopyright © 2022. All rights reserved.