JaCoP.constraints
Class Sequence

java.lang.Object
  extended by JaCoP.constraints.DecomposedConstraint
      extended by JaCoP.constraints.Sequence

public class Sequence
extends DecomposedConstraint

It constructs a Sequence constraint.

Version:
3.1
Author:
Radoslaw Szymanek and Polina Makeeva

Field Summary
 
Fields inherited from class JaCoP.constraints.DecomposedConstraint
queueIndex
 
Constructor Summary
Sequence(IntVar[] list, IntervalDomain set, int q, int min, int max)
          It creates a Sequence constraint.
 
Method Summary
 java.util.ArrayList<Constraint> decompose(Store store)
          It returns an array list of constraint which are used to decompose this constraint.
 void imposeDecomposition(Store store)
          It imposes the constraint in a given store.
 
Methods inherited from class JaCoP.constraints.DecomposedConstraint
auxiliaryVariables, imposeDecomposition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 sequence
min - the minimal occurrences of values from set within a sequence.
max - the maximal occurrences of values from set within a sequence.
Method Detail

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.