choco.integer.constraints.extension
Class CouplesTest

java.lang.Object
  extended by choco.integer.constraints.extension.ConsistencyRelation
      extended by choco.integer.constraints.extension.CouplesTest
All Implemented Interfaces:
BinRelation, java.lang.Cloneable

public abstract class CouplesTest
extends ConsistencyRelation
implements BinRelation


Field Summary
 
Fields inherited from class choco.integer.constraints.extension.ConsistencyRelation
feasible
 
Constructor Summary
protected CouplesTest()
          the default constructor build a relation in feasability
protected CouplesTest(boolean feasible)
           
 
Method Summary
 ConsistencyRelation getOpposite()
          return the opposite relation of itself
 boolean isConsistent(int x, int y)
          check if the couple (x,y) is consistent according to the feasability of the relation and the checkCouple method.
 
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
 
Methods inherited from interface choco.integer.constraints.extension.BinRelation
checkCouple
 

Constructor Detail

CouplesTest

protected CouplesTest()
the default constructor build a relation in feasability


CouplesTest

protected CouplesTest(boolean feasible)
Method Detail

isConsistent

public boolean isConsistent(int x,
                            int y)
check if the couple (x,y) is consistent according to the feasability of the relation and the checkCouple method. checkCouple have to be overriden by any concrete CouplesTest relation.

Specified by:
isConsistent in interface BinRelation
Returns:
true if (x,y) is a consistent couple

getOpposite

public ConsistencyRelation getOpposite()
Description copied from class: ConsistencyRelation
return the opposite relation of itself

Specified by:
getOpposite in class ConsistencyRelation
Returns:
the opposite relation