Package org.jacop.constraints.diffn
Class DiffnDecomposed
Diffn constraint assures that any two rectangles from a vector of rectangles
does not overlap in at least one direction. It is a simple implementation which
does not use sophisticated techniques for efficient backtracking.
- Version:
- 4.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<Constraint> (package private) final IntVar[](package private) final IntVar[](package private) final IntVar[](package private) final IntVar[]Fields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex -
Constructor Summary
ConstructorsConstructorDescriptionDiffnDecomposed(List<? extends List<? extends IntVar>> rectangle) It specifies a diffn constraint.DiffnDecomposed(List<? extends IntVar> x, List<? extends IntVar> y, List<? extends IntVar> lx, List<? extends IntVar> ly) It constructs a diffn constraint.DiffnDecomposed(IntVar[][] rectangle) It specifies a diffn constraint.DiffnDecomposed(IntVar[] origin1, IntVar[] origin2, IntVar[] length1, IntVar[] length2) It constructs a diffn constraint. -
Method Summary
Modifier and TypeMethodDescriptionIt returns an array list of constraint which are used to decompose this constraint.voidimposeDecomposition(Store store) It imposes DiffnDecomposed in a given store.toString()Methods inherited from class org.jacop.constraints.DecomposedConstraint
checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
Field Details
-
constraints
-
auxVar
-
x
-
y
-
lx
-
ly
-
-
Constructor Details
-
DiffnDecomposed
It specifies a diffn constraint.- Parameters:
rectangle- list of rectangles which can not overlap in at least one dimension.
-
DiffnDecomposed
It constructs a diffn constraint.- Parameters:
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.
-
DiffnDecomposed
It specifies a diffn constraint.- Parameters:
rectangle- list of rectangles which can not overlap in at least one dimension.
-
DiffnDecomposed
public DiffnDecomposed(List<? extends IntVar> x, List<? extends IntVar> y, List<? extends IntVar> lx, List<? extends IntVar> ly) It constructs a diffn constraint.- Parameters:
x- list of variables denoting origin of the rectangle in the first dimension.y- list of variables denoting origin of the rectangle in the second dimension.lx- list of variables denoting length of the rectangle in the first dimension.ly- list of variables denoting length of the rectangle in the second dimension.
-
-
Method Details
-
imposeDecomposition
It imposes DiffnDecomposed in a given store.- Specified by:
imposeDecompositionin classDecomposedConstraint<Constraint>- Parameters:
store- the constraint store to which the constraint is imposed to.
-
decompose
Description copied from class:DecomposedConstraintIt returns an array list of constraint which are used to decompose this constraint. It actually creates a decomposition (possibly also creating variables), but it does not impose the constraint.- Specified by:
decomposein classDecomposedConstraint<Constraint>- Parameters:
store- the constraint store in which context the decomposition takes place.- Returns:
- an array list of constraints used to decompose this constraint.
-
auxiliaryVariables
- Overrides:
auxiliaryVariablesin classDecomposedConstraint<Constraint>- Returns:
- null if no auxiliary variables were created, otherwise a list with variables.
-
toString
-