- java.lang.Object
-
- org.chocosolver.solver.constraints.extension.nary.LargeRelation
-
- org.chocosolver.solver.constraints.extension.nary.TuplesList
-
public class TuplesList extends LargeRelation
A simple way of storing the tuples as a list. This doesn't allow consistency check (TuplesTable is made for that) or iteration over supports of each value (IterTuplesTable is made for that) This simple way of storing supports only allow fast iteration over the all set of tuples and is used by STR gac scheme.
-
-
Field Summary
Fields Modifier and Type Field Description protected static Comparator<int[]>
TCOMP
protected int[][]
tuplesIndexes
-
Constructor Summary
Constructors Constructor Description TuplesList(Tuples tuples, IntVar[] vars)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkTuple(int[] tuple)
return true if tuple is feasible according to the definition of the relation. e.g if the relation is defined with infeasible tuples, it returns true if tuple is one of them.Tuples
convert()
Convert this relation into 'Tuples'int[]
getTuple(int support)
int[][]
getTupleTable()
boolean
isConsistent(int[] tuple)
Test whether a tuple is consistent-
Methods inherited from class org.chocosolver.solver.constraints.extension.nary.LargeRelation
valid
-
-
-
-
Field Detail
-
tuplesIndexes
protected final int[][] tuplesIndexes
-
TCOMP
protected static final Comparator<int[]> TCOMP
-
-
Method Detail
-
getTuple
public int[] getTuple(int support)
-
getTupleTable
public int[][] getTupleTable()
-
checkTuple
public boolean checkTuple(int[] tuple)
Description copied from class:LargeRelation
return true if tuple is feasible according to the definition of the relation. e.g if the relation is defined with infeasible tuples, it returns true if tuple is one of them.- Specified by:
checkTuple
in classLargeRelation
-
isConsistent
public boolean isConsistent(int[] tuple)
Description copied from class:LargeRelation
Test whether a tuple is consistent- Specified by:
isConsistent
in classLargeRelation
- Returns:
- true if tuple is consistent.
-
convert
public Tuples convert()
Description copied from class:LargeRelation
Convert this relation into 'Tuples'- Specified by:
convert
in classLargeRelation
- Returns:
-
-