choco.kernel.solver.constraints.integer.extension
Class TuplesList
java.lang.Object
choco.kernel.solver.constraints.integer.extension.TuplesList
- All Implemented Interfaces:
- LargeRelation
- Direct Known Subclasses:
- IterTuplesTable
public class TuplesList
- extends Object
- implements 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 |
protected int[][] |
tuplesIndexes
each tuple (a int[]) has its own index |
Method Summary |
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. |
int[] |
getTuple(int support)
|
int[][] |
getTupleTable()
|
boolean |
isConsistent(int[] tuple)
Test whether a tuple is consistent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tuplesIndexes
protected int[][] tuplesIndexes
- each tuple (a int[]) has its own index
TuplesList
public TuplesList(List<int[]> tuples)
getTuple
public int[] getTuple(int support)
getTupleTable
public int[][] getTupleTable()
checkTuple
public boolean checkTuple(int[] tuple)
- Description copied from interface:
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 interface LargeRelation
- Returns:
isConsistent
public boolean isConsistent(int[] tuple)
- Description copied from interface:
LargeRelation
- Test whether a tuple is consistent
- Specified by:
isConsistent
in interface LargeRelation
- Returns:
- true if tuple is consistent.
Copyright © 2012. All Rights Reserved.