choco.set.constraint
Class AbstractSetConstraint

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.AbstractConstraint
          extended by choco.set.constraint.AbstractSetConstraint
All Implemented Interfaces:
Constraint, Entity, VarEventListener, Propagator, SetConstraint, SetVarEventListener, java.lang.Cloneable, java.util.EventListener
Direct Known Subclasses:
AbstractBinSetConstraint, AbstractTernSetConstraint, AbstractUnSetConstraint

public abstract class AbstractSetConstraint
extends AbstractConstraint
implements SetConstraint


Field Summary
protected static java.util.logging.Logger logger
          Reference to an object for logging trace statements related to constraints over set (using the java.util.logging package)
 
Fields inherited from class choco.AbstractConstraint
active, constAwakeEvent, hook, priority
 
Fields inherited from class choco.AbstractEntity
problem
 
Constructor Summary
AbstractSetConstraint()
           
 
Method Summary
 void awakeOnEnv(int varIdx, int x)
          Default propagation on enveloppe modification: propagation on removing a value from the enveloppe.
 void awakeOnEnvRemovals(int idx, IntIterator deltaDomain)
           
 void awakeOnInst(int varIdx)
          Default propagation on instantiation.
 void awakeOnKer(int varIdx, int x)
          Default propagation on kernel modification: propagation on adding a value to the kernel.
 void awakeOnkerAdditions(int idx, IntIterator deltaDomain)
           
 int getSelfIndex()
          returns the (global) index of the constraint among all constraints of the problem
 boolean isCompletelyInstantiated()
          Utility: Testing if all variables involved in the constraint are instantiated.
 
Methods inherited from class choco.AbstractConstraint
addListener, awake, awakeOnVar, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, 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.set.SetConstraint
getSetVar
 
Methods inherited from interface choco.Propagator
assignIndices, awake, awakeOnVar, constAwake, delete, getEvent, getPlugIn, getPriority, isConsistent, isEntailed, propagate
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 
Methods inherited from interface choco.set.var.SetVarEventListener
getConstraintIdx, setConstraintIndex
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 

Field Detail

logger

protected static java.util.logging.Logger logger
Reference to an object for logging trace statements related to constraints over set (using the java.util.logging package)

Constructor Detail

AbstractSetConstraint

public AbstractSetConstraint()
Method Detail

awakeOnKer

public void awakeOnKer(int varIdx,
                       int x)
                throws ContradictionException
Description copied from interface: SetVarEventListener
Default propagation on kernel modification: propagation on adding a value to the kernel.

Specified by:
awakeOnKer in interface SetVarEventListener
Throws:
ContradictionException

awakeOnEnv

public void awakeOnEnv(int varIdx,
                       int x)
                throws ContradictionException
Description copied from interface: SetVarEventListener
Default propagation on enveloppe modification: propagation on removing a value from the enveloppe.

Specified by:
awakeOnEnv in interface SetVarEventListener
Throws:
ContradictionException

awakeOnInst

public void awakeOnInst(int varIdx)
                 throws ContradictionException
Description copied from interface: SetVarEventListener
Default propagation on instantiation.

Specified by:
awakeOnInst in interface SetVarEventListener
Throws:
ContradictionException

awakeOnEnvRemovals

public void awakeOnEnvRemovals(int idx,
                               IntIterator deltaDomain)
                        throws ContradictionException
Specified by:
awakeOnEnvRemovals in interface SetConstraint
Throws:
ContradictionException

awakeOnkerAdditions

public void awakeOnkerAdditions(int idx,
                                IntIterator deltaDomain)
                         throws ContradictionException
Specified by:
awakeOnkerAdditions in interface SetConstraint
Throws:
ContradictionException

isCompletelyInstantiated

public boolean isCompletelyInstantiated()
Description copied from interface: Propagator
Utility: Testing if all variables involved in the constraint are instantiated.

Specified by:
isCompletelyInstantiated in interface Propagator

getSelfIndex

public int getSelfIndex()
returns the (global) index of the constraint among all constraints of the problem