Package org.jacop.constraints
Class Lex
- java.lang.Object
-
- org.jacop.constraints.DecomposedConstraint<Constraint>
-
- org.jacop.constraints.Lex
-
public class Lex extends DecomposedConstraint<Constraint>
It constructs a Lex (lexicographical order) constraint.- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<Constraint>constraintsIt contains constraints of the lex constraint decomposition.booleanlexLTIs the lex enforcing lower then relationship?IntVar[][]xA two dimensional array containing arrays which have to be lexicographically ordered.-
Fields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Constraint>decompose(Store store)It returns an array list of constraint which are used to decompose this constraint.java.util.List<Constraint>decomposeLE(Store store)java.util.List<Constraint>decomposeLERegular(Store store)java.util.List<Constraint>decomposeLT(Store store)java.util.List<Constraint>decomposeLTRegular(Store store)voidimposeDecomposition(Store store)It imposes the constraint in a given store.-
Methods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
-
-
-
Field Detail
-
x
public IntVar[][] x
A two dimensional array containing arrays which have to be lexicographically ordered.
-
constraints
java.util.List<Constraint> constraints
It contains constraints of the lex constraint decomposition.
-
lexLT
public final boolean lexLT
Is the lex enforcing lower then relationship?
-
-
Constructor Detail
-
Lex
public Lex(IntVar[][] x)
It creates a lexicographical order for vectors x[i], i.e. forall i, exists j : x[i][k] = x[i+1][k] for k < j and x[i][k] <= x[i+1][k] for k >= jvectors x[i] does not need to be of the same size. boolea lt defines if we require Lex_{<} (lt = false) or Lex_{=<} (lt = true)
- Parameters:
x- vector of vectors which assignment is constrained by Lex constraint.
-
Lex
public Lex(IntVar[][] x, boolean lt)
-
-
Method Detail
-
imposeDecomposition
public void imposeDecomposition(Store store)
Description copied from class:DecomposedConstraintIt imposes the constraint in a given store.- Specified by:
imposeDecompositionin classDecomposedConstraint<Constraint>- Parameters:
store- the constraint store to which the constraint is imposed to.
-
decompose
public java.util.List<Constraint> decompose(Store store)
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.
-
decomposeLERegular
public java.util.List<Constraint> decomposeLERegular(Store store)
-
decomposeLTRegular
public java.util.List<Constraint> decomposeLTRegular(Store store)
-
decomposeLT
public java.util.List<Constraint> decomposeLT(Store store)
-
decomposeLE
public java.util.List<Constraint> decomposeLE(Store store)
-
-