Class Lex


public class Lex extends DecomposedConstraint<Constraint>
It constructs a Lex (lexicographical order) constraint.
Version:
4.8
  • Field Details

    • x

      public IntVar[][] x
      A two dimensional array containing arrays which have to be lexicographically ordered.
    • constraints

      List<Constraint> constraints
      It contains constraints of the lex constraint decomposition.
    • lexLT

      public final boolean lexLT
      Is the lex enforcing lower then relationship?
  • Constructor Details

    • 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 >= j

      vectors 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 Details

    • 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<Constraint>
      Parameters:
      store - the constraint store to which the constraint is imposed to.
    • decompose

      public List<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<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 List<Constraint> decomposeLERegular(Store store)
    • decomposeLTRegular

      public List<Constraint> decomposeLTRegular(Store store)
    • decomposeLT

      public List<Constraint> decomposeLT(Store store)
    • decomposeLE

      public List<Constraint> decomposeLE(Store store)