|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.prop.VarEvent
public abstract class VarEvent
Implements an
PropagationEvent
for the variable events.
Field Summary | |
---|---|
protected int |
cause
Cause of this basic var. |
static int |
EMPTYEVENT
empty bitvector for the event type. |
protected int |
eventType
stores the type of update performed on the variable |
protected static java.util.logging.Logger |
logger
Reference to the root Logger, an object for logging trace statements related to propagation events (using the java.util.logging package) |
protected AbstractVar |
modifiedVar
The touched variable. |
static int |
NOCAUSE
Semantic of the cause of an event: -1 means that the event is active without any precise cause. |
static int |
NOEVENT
empty bitvector for the event type. |
Fields inherited from interface choco.prop.PropagationEvent |
---|
POPPING |
Constructor Summary | |
---|---|
VarEvent(AbstractVar var)
Constructs a variable event for the specified variable and with the given basic events. |
Method Summary | |
---|---|
abstract 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. |
int |
getCause()
Returns the cause of this basic var. |
java.lang.Object |
getModifiedObject()
Returns the touched variable. |
AbstractVar |
getModifiedVar()
Returns the touched variable. |
int |
getPriority()
Returns the priority of the object. |
AbstractProblem |
getProblem()
Retrieving the problem. |
boolean |
isActive(int idx)
Checks if a given listener is active or not |
boolean |
isEnqueued()
tests whether the event is currently active (present in some queue) or not |
abstract boolean |
propagateEvent()
Propagates the event through calls to the propagation engine. |
void |
recordEventTypeAndCause(int basicEvt,
int idx)
|
protected boolean |
release()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NOEVENT
public static final int NOCAUSE
protected int cause
public static final int EMPTYEVENT
protected AbstractVar modifiedVar
protected static java.util.logging.Logger logger
protected int eventType
Constructor Detail |
---|
public VarEvent(AbstractVar var)
Method Detail |
---|
public AbstractVar getModifiedVar()
public java.lang.Object getModifiedObject()
getModifiedObject
in interface PropagationEvent
protected void freeze()
protected boolean release()
public abstract boolean propagateEvent() throws ContradictionException
propagateEvent
in interface PropagationEvent
ContradictionException
public abstract void clear()
clear
in interface PropagationEvent
public boolean isActive(int idx)
isActive
in interface PropagationEvent
idx
- the index of the listener among all listeners connected to the variablepublic AbstractProblem getProblem()
public int getCause()
public int getPriority()
IPrioritizable
getPriority
in interface IPrioritizable
public boolean isEnqueued()
public void recordEventTypeAndCause(int basicEvt, int idx)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |