Class TableSymbolic

    • Constructor Detail

      • TableSymbolic

        public TableSymbolic()
    • Method Detail

      • clean

        public static String[][] clean​(String[][] tuples)
        Returns an array of tuples in lexicographic order, and without any duplicates.
        Parameters:
        tuples - an array of tuples
        Returns:
        an array of tuples in lexicographic order, and without any duplicates
      • positive

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

        public int size()
        Description copied from class: TableAbstract
        Returns the number of tuples in this table
        Specified by:
        size in class TableAbstract
        Returns:
        the number of tuples in this table
      • add

        public TableSymbolic add​(String... tuple)
        Adds the specified symbolic tuple to the table.
        Parameters:
        tuple - a symbolic tuple
        Returns:
        this symbolic table
      • add

        public TableSymbolic add​(String[]... tuples)
        Adds the specified symbolic tuples to the table.
        Parameters:
        tuples - a sequence of tuples
        Returns:
        this symbolic table
      • add

        public TableSymbolic add​(java.util.stream.Stream<String[]> stream)
        Adds all tuples of the specified stream to the table.
        Parameters:
        stream - a stream of tuples to be added to the table
        Returns:
        this symbolic table
      • addSequence

        public TableSymbolic addSequence​(String s)
        Adds the tuples obtained after parsing the specified string. The string must represent a sequence of tuples as defined in XCSP3. For example, it could be "(a,a,b)(a,c,a)(b,a,b)(b,b,c)".
        Parameters:
        s - a string representing a sequence of tuples
        Returns:
        this symbolic table
      • toArray

        public String[][] toArray()
        Returns a 2-dimensional array corresponding to the collected tuples.
        Returns:
        a 2-dimensional array corresponding to the collected tuples