choco.integer.constraints.extension
Class CspBinConstraint

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.AbstractConstraint
          extended by choco.integer.constraints.AbstractIntConstraint
              extended by choco.integer.constraints.AbstractBinIntConstraint
                  extended by choco.integer.constraints.extension.CspBinConstraint
All Implemented Interfaces:
Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
Direct Known Subclasses:
AC2001BinConstraint, AC3BinConstraint, AC4BinConstraint

public abstract class CspBinConstraint
extends AbstractBinIntConstraint


Field Summary
protected  BinRelation relation
           
 
Fields inherited from class choco.integer.constraints.AbstractBinIntConstraint
cIdx0, cIdx1, v0, v1
 
Fields inherited from class choco.integer.constraints.AbstractIntConstraint
logger
 
Fields inherited from class choco.AbstractConstraint
active, constAwakeEvent, hook, priority
 
Fields inherited from class choco.AbstractEntity
problem
 
Constructor Summary
protected CspBinConstraint(IntDomainVar x, IntDomainVar y, BinRelation relation)
           
 
Method Summary
 void awakeOnVar(int idx)
          Default propagation on variable revision: full constraint re-propagation.
 BinRelation getRelation()
           
 java.lang.Boolean isEntailed()
          Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables.
 boolean isSatisfied()
          Checks if the constraint is satisfied when the variables are instantiated.
 
Methods inherited from class choco.integer.constraints.AbstractBinIntConstraint
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, propagate, setConstraintIndex, setVar
 
Methods inherited from class choco.integer.constraints.AbstractIntConstraint
awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnRem, awakeOnRemovals, awakeOnSup, getSelfIndex, isConsistent
 
Methods inherited from class choco.AbstractConstraint
addListener, awake, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar
 
Methods inherited from class choco.AbstractEntity
pretty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.Propagator
awake, constAwake, delete, getEvent, getPlugIn, getPriority
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 

Field Detail

relation

protected BinRelation relation
Constructor Detail

CspBinConstraint

protected CspBinConstraint(IntDomainVar x,
                           IntDomainVar y,
                           BinRelation relation)
Method Detail

isSatisfied

public boolean isSatisfied()
Checks if the constraint is satisfied when the variables are instantiated.

Returns:
true if the constraint is satisfied

getRelation

public BinRelation getRelation()

awakeOnVar

public void awakeOnVar(int idx)
                throws ContradictionException
Description copied from class: AbstractConstraint
Default propagation on variable revision: full constraint re-propagation.

Specified by:
awakeOnVar in interface VarEventListener
Specified by:
awakeOnVar in interface Propagator
Overrides:
awakeOnVar in class AbstractConstraint
Throws:
ContradictionException

isEntailed

public java.lang.Boolean isEntailed()
Description copied from interface: Propagator
Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables.

Specified by:
isEntailed in interface Propagator
Overrides:
isEntailed in class AbstractConstraint