|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.integer.constraints.extension.ConsistencyRelation
choco.integer.constraints.extension.TuplesTable
public class TuplesTable
Field Summary | |
---|---|
protected int[] |
blocks
in order to speed up the computation of the index of a tuple in the table, blocks[i] stores the product of the size of variables j with j < i. |
protected int |
n
the number of dimensions of the considered tuples |
protected int[] |
offsets
offset (lower bound) of each variable |
protected int[] |
sizes
domain size of each variable |
protected java.util.BitSet |
table
The consistency matrix |
Fields inherited from class choco.integer.constraints.extension.ConsistencyRelation |
---|
feasible |
Constructor Summary | |
---|---|
TuplesTable(boolean feas,
int[] offsetTable,
int[] sizesTable)
|
|
TuplesTable(int n)
|
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. |
ConsistencyRelation |
getOpposite()
return the opposite relation of itself |
boolean |
isConsistent(int[] tuple)
Test whether a tuple is consistent |
void |
setCouple(int[] tuple)
|
Methods inherited from class choco.integer.constraints.extension.ConsistencyRelation |
---|
isDefinedByFeasability, switchToOppositeRelation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int n
protected java.util.BitSet table
protected int[] offsets
protected int[] sizes
protected int[] blocks
Constructor Detail |
---|
public TuplesTable(int n)
public TuplesTable(boolean feas, int[] offsetTable, int[] sizesTable)
Method Detail |
---|
public boolean checkTuple(int[] tuple)
LargeRelation
checkTuple
in interface LargeRelation
public boolean isConsistent(int[] tuple)
LargeRelation
isConsistent
in interface LargeRelation
public void setCouple(int[] tuple)
public ConsistencyRelation getOpposite()
ConsistencyRelation
getOpposite
in class ConsistencyRelation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |