Package org.xcsp.common.structures
Class TableAbstract
- java.lang.Object
-
- org.xcsp.common.structures.TableAbstract
-
- Direct Known Subclasses:
Table,TableSymbolic
public abstract class TableAbstract extends Object
This class allows us to represent tables that are useful objects when definingextensionconstraints.
-
-
Field Summary
Fields Modifier and Type Field Description BooleanpositiveStringTABLE_SYNTAX_PB
-
Constructor Summary
Constructors Constructor Description TableAbstract()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancontrolStringRepresentationOfTuples(String tuples)Controls that the string is well-formed.TableAbstractpositive(Boolean positive)Sets if the table is positive (i.e, contains supports) or negative (i.e., contains conflicts)abstract intsize()Returns the number of tuples in this table
-
-
-
Field Detail
-
TABLE_SYNTAX_PB
public final String TABLE_SYNTAX_PB
- See Also:
- Constant Field Values
-
positive
public Boolean positive
-
-
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:
trueif the tuples are integer
-
-