JaCoP.constraints
Class Sequence
java.lang.Object
JaCoP.constraints.DecomposedConstraint
JaCoP.constraints.Sequence
public class Sequence
- extends DecomposedConstraint
It constructs a Sequence constraint.
- Version:
- 3.1
- Author:
- Radoslaw Szymanek and Polina Makeeva
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sequence
public Sequence(IntVar[] list,
IntervalDomain set,
int q,
int min,
int max)
- It creates a Sequence constraint.
- Parameters:
list - variables which assignment is constrained by Sequence constraint.set - set of values which occurrence is counted within each sequence.q - the length of the sequencemin - the minimal occurrences of values from set within a sequence.max - the maximal occurrences of values from set within a sequence.
imposeDecomposition
public void imposeDecomposition(Store store)
- Description copied from class:
DecomposedConstraint
- It imposes the constraint in a given store.
- Specified by:
imposeDecomposition in class DecomposedConstraint
- Parameters:
store - the constraint store to which the constraint is imposed to.
decompose
public java.util.ArrayList<Constraint> decompose(Store store)
- Description copied from class:
DecomposedConstraint
- It 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:
decompose in class DecomposedConstraint
- Parameters:
store - the constraint store in which context the decomposition takes place.
- Returns:
- an array list of constraints used to decompose this constraint.