|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.propagation.VariableEventQueue
choco.cp.solver.propagation.BlockingVarEventQueue
public class BlockingVarEventQueue
Field Summary | |
---|---|
static boolean |
_LOG
|
protected Queue<PropagationEvent> |
queue
FIFO queue to deal with variable events |
Fields inherited from class choco.cp.solver.propagation.VariableEventQueue |
---|
lastPopped |
Fields inherited from interface choco.kernel.solver.propagation.queue.EventQueue |
---|
LOGGER |
Constructor Summary | |
---|---|
BlockingVarEventQueue()
|
Method Summary | |
---|---|
void |
clear()
Clear datastructures for safe reuses |
void |
flushEventQueue()
Removes all the events (including the popping one). |
PropagationEvent |
get(int idx)
returns the i-th pending event in the queue |
boolean |
isEmpty()
Checks if the queue is empty. |
PropagationEvent |
popEvent()
Pops an event to propagate. |
void |
propagateAllEvents()
Propagates some events: in fact all the events of the queue, since there are the most important events. |
void |
propagateOneEvent()
Propagates one single event from the queue (usefull for tracing) |
boolean |
pushEvent(PropagationEvent event)
Adds an event to the queue. |
boolean |
remove(PropagationEvent event)
Removes an event. |
int |
size()
returns the number of pending events in the queue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean _LOG
protected final Queue<PropagationEvent> queue
Constructor Detail |
---|
public BlockingVarEventQueue()
Method Detail |
---|
public void clear()
clear
in interface EventQueue
clear
in class VariableEventQueue
public boolean isEmpty()
isEmpty
in interface EventQueue
isEmpty
in class VariableEventQueue
public void propagateAllEvents() throws ContradictionException
propagateAllEvents
in interface EventQueue
propagateAllEvents
in class VariableEventQueue
ContradictionException
public void propagateOneEvent() throws ContradictionException
propagateOneEvent
in interface EventQueue
propagateOneEvent
in class VariableEventQueue
ContradictionException
public PropagationEvent popEvent()
popEvent
in interface EventQueue
popEvent
in class VariableEventQueue
public boolean pushEvent(PropagationEvent event)
pushEvent
in interface EventQueue
pushEvent
in class VariableEventQueue
public void flushEventQueue()
flushEventQueue
in interface EventQueue
flushEventQueue
in class VariableEventQueue
public boolean remove(PropagationEvent event)
remove
in interface EventQueue
remove
in class VariableEventQueue
public int size()
EventQueue
size
in interface EventQueue
size
in class VariableEventQueue
public PropagationEvent get(int idx)
EventQueue
get
in interface EventQueue
get
in class VariableEventQueue
idx
- the index of the event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |