Class TableAbstract

  • Direct Known Subclasses:
    Table, TableSymbolic

    public abstract class TableAbstract
    extends Object
    This class allows us to represent tables that are useful objects when defining extension constraints.
    • Constructor Detail

      • TableAbstract

        public TableAbstract()
    • Method Detail

      • positive

        public TableAbstract positive​(Boolean positive)
        Sets if the table is positive (i.e, contains supports) or negative (i.e., contains conflicts)
        Parameters:
        positive - a Boolean value indicating if the table is positive (true) or negative (false)
        Returns:
        this table
      • size

        public abstract int size()
        Returns the number of tuples in this table
        Returns:
        the number of tuples in this table
      • controlStringRepresentationOfTuples

        protected boolean controlStringRepresentationOfTuples​(String tuples)
        Controls that the string is well-formed. The string must represent a sequence of tuples as defined in XCSP3. For example, it could be "(0,0,1)(0,2,0)(1,0,1)(1,1,2)" when tuples are integer or "(a,a,b)(a,c,a)(b,a,b)(b,b,c)" when tuples are symbolic.
        Parameters:
        tuples - a string representing a sequence of tuples
        Returns:
        true if the tuples are integer