choco.kernel.solver.constraints.set
Class AbstractSetSConstraint

java.lang.Object
  extended by choco.kernel.solver.propagation.Propagator
      extended by choco.kernel.solver.constraints.AbstractSConstraint<SetVar>
          extended by choco.kernel.solver.constraints.set.AbstractSetSConstraint
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<SetVar>, SetPropagator, Cloneable, EventListener
Direct Known Subclasses:
AbstractLargeSetSConstraint, AbstractTernSetSConstraint

public abstract class AbstractSetSConstraint
extends AbstractSConstraint<SetVar>
implements SetPropagator


Field Summary
 
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint
cIndices, constraintType, extensions, vars
 
Fields inherited from class choco.kernel.solver.propagation.Propagator
active, constAwakeEvent, priority, propagationEngine
 
Fields inherited from interface choco.kernel.solver.constraints.SConstraint
LOGGER
 
Constructor Summary
protected AbstractSetSConstraint(SetVar[] vars)
          Constraucts a constraint with the priority 0.
 
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, DisposableIntIterator deltaDomain)
          BEWARE: No need to dipose the iterator, this done in the calling methode
 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, DisposableIntIterator deltaDomain)
          BEWARE: No need to dipose the iterator, this done in the calling methode
 SConstraintType getConstraintType()
          Return the type of constraint, ie the type of variable involved in the constraint
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, awake, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, isConsistent, propagate, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface choco.kernel.solver.constraints.SConstraint
isSatisfied
 

Constructor Detail

AbstractSetSConstraint

protected AbstractSetSConstraint(SetVar[] vars)
Constraucts a constraint with the priority 0.

Method Detail

awakeOnKer

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

Specified by:
awakeOnKer in interface SetPropagator
Throws:
ContradictionException

awakeOnEnv

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

Specified by:
awakeOnEnv in interface SetPropagator
Throws:
ContradictionException

awakeOnInst

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

Specified by:
awakeOnInst in interface SetPropagator
Throws:
ContradictionException

awakeOnEnvRemovals

public void awakeOnEnvRemovals(int idx,
                               DisposableIntIterator deltaDomain)
                        throws ContradictionException
Description copied from interface: SetPropagator
BEWARE: No need to dipose the iterator, this done in the calling methode

Specified by:
awakeOnEnvRemovals in interface SetPropagator
Throws:
ContradictionException

awakeOnkerAdditions

public void awakeOnkerAdditions(int idx,
                                DisposableIntIterator deltaDomain)
                         throws ContradictionException
Description copied from interface: SetPropagator
BEWARE: No need to dipose the iterator, this done in the calling methode

Specified by:
awakeOnkerAdditions in interface SetPropagator
Throws:
ContradictionException

getConstraintType

public SConstraintType getConstraintType()
Description copied from interface: SConstraint
Return the type of constraint, ie the type of variable involved in the constraint

Specified by:
getConstraintType in interface SConstraint<SetVar>
Returns:


Copyright © 2012. All Rights Reserved.