|
|||||||||
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.CouplesTable
public class CouplesTable
Field Summary | |
---|---|
protected int |
n2
size of the initial domain of x |
protected int |
offset1
first value of x |
protected int |
offset2
first value of y |
protected java.util.BitSet |
table
matrix of consistency/inconsistency |
Fields inherited from class choco.integer.constraints.extension.ConsistencyRelation |
---|
feasible |
Constructor Summary | |
---|---|
CouplesTable()
|
|
CouplesTable(boolean feas,
int offset1,
int offset2,
int n1,
int n2)
|
Method Summary | |
---|---|
boolean |
checkCouple(int x,
int y)
return true if couple (x,y) is feasible according to the definition of the relation. e.g if the relation is defined with infeasible tuples, it returns true if (x,y) is one of them. |
ConsistencyRelation |
getOpposite()
compute the opposite relation by "reusing" the table of consistency |
boolean |
isConsistent(int x,
int y)
Test whether the couple (x,y) is consistent |
void |
setCouple(int x,
int y)
|
void |
setCoupleWithoutOffset(int x,
int y)
|
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 java.util.BitSet table
protected int offset1
protected int offset2
protected int n2
Constructor Detail |
---|
public CouplesTable()
public CouplesTable(boolean feas, int offset1, int offset2, int n1, int n2)
Method Detail |
---|
public ConsistencyRelation getOpposite()
getOpposite
in class ConsistencyRelation
public void setCouple(int x, int y)
public void setCoupleWithoutOffset(int x, int y)
public boolean isConsistent(int x, int y)
BinRelation
isConsistent
in interface BinRelation
public boolean checkCouple(int x, int y)
BinRelation
checkCouple
in interface BinRelation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |