choco.cp.solver.variables.integer
Class IntCsteEvent<C extends AbstractSConstraint & IntPropagator>
java.lang.Object
choco.kernel.solver.propagation.event.VarEvent<IntDomainVarImpl>
choco.cp.solver.variables.integer.IntVarEvent<C>
choco.cp.solver.variables.integer.IntCsteEvent<C>
- All Implemented Interfaces:
- IPrioritizable, PropagationEvent
public class IntCsteEvent<C extends AbstractSConstraint & IntPropagator>
- extends IntVarEvent<C>
Fields inherited from class choco.cp.solver.variables.integer.IntVarEvent |
BOUNDS_MASK, BOUNDSbitvector, DECSUP, DECSUP_MASK, DECSUPbitvector, EVENTS, INCINF, INCINF_MASK, INCINFbitvector, INSTINT, INSTINT_MASK, INSTINTbitvector, NO_MASK, propagations, REMVAL, REMVAL_MASK, REMVALbitvector |
Method Summary |
void |
clear()
Clears the var: delegates to the basic events. |
protected void |
freeze()
freezes the state of the "delta domain": the set of values that are considered for removal
from the domain. |
boolean |
getReleased()
|
boolean |
propagateEvent()
Propagates the event through calls to the propagation engine. |
protected boolean |
release()
the event had been "frozen", (since the call to freeze), while it was handled by the propagation engine:
This meant that the meaning of the event could not be changed: it represented
a static set of value removals, during propagation. |
String |
toString()
useful for debugging |
Methods inherited from class choco.kernel.solver.propagation.event.VarEvent |
addPropagatedEvents, domOverWDegIdx, domOverWDegInitialIdx, getCause, getEventType, getModifiedObject, getModifiedVar, getPriority, getPropagatedEvents, isActive, isEnqueued |
IntCsteEvent
public IntCsteEvent(IntDomainVarImpl var)
toString
public String toString()
- useful for debugging
- Overrides:
toString
in class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
clear
public void clear()
- Clears the var: delegates to the basic events.
- Specified by:
clear
in interface PropagationEvent
- Overrides:
clear
in class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
release
protected boolean release()
- the event had been "frozen", (since the call to freeze), while it was handled by the propagation engine:
This meant that the meaning of the event could not be changed: it represented
a static set of value removals, during propagation.
Now, the event becomes "open" again: new value removals can be hosted, the delta domain can
accept that further values are removed.
In case value removals happened while the event was frozen, the release method returns false
(the event cannot be released, it must be handled once more). Otherwise (the standard behavior),
the method returns true
- Overrides:
release
in class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
freeze
protected void freeze()
- Description copied from class:
VarEvent
- freezes the state of the "delta domain": the set of values that are considered for removal
from the domain. Further removals will be treated as a further event.
- Overrides:
freeze
in class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
getReleased
public boolean getReleased()
- Overrides:
getReleased
in class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
propagateEvent
public boolean propagateEvent()
throws ContradictionException
- Propagates the event through calls to the propagation engine.
- Specified by:
propagateEvent
in interface PropagationEvent
- Overrides:
propagateEvent
in class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
- Returns:
- true if the event has been fully propagated (and can thus be discarded), false otherwise
- Throws:
ContradictionException
Copyright © 2012. All Rights Reserved.