Module org.maxicp

Class TableCT

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.TableCT
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class TableCT extends AbstractCPConstraint
Implementation of Compact Table algorithm described in

Compact-Table: Efficiently Filtering Table Constraints with Reversible Sparse Bit-Sets Jordan Demeulenaere, Renaud Hartert, Christophe Lecoutre, Guillaume Perez, Laurent Perron, Jean-Charles Régin, Pierre Schaus

See The article.

  • Constructor Details

    • TableCT

      public TableCT(CPIntVar[] x, int[][] table)
      Table constraint.

      The table constraint ensures that x is a row from the given table. More exactly, there exist some row i such that x[0]==table[i][0], x[1]==table[i][1], etc.

      This constraint is sometimes called in extension constraint as the user enumerates the set of solutions that can be taken by the variables.

      Parameters:
      x - the non-empty set of variables to constraint
      table - the possible set of solutions for x. The second dimension must be of the same size as the array x.
  • Method Details