|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.propagation.VariableEventQueue
public class VariableEventQueue
Field Summary | |
---|---|
protected PropagationEvent |
lastPopped
The last popped var (may be useful for flushing popping events). |
protected Queue<PropagationEvent> |
queue
FIFO queue to deal with variable events |
Fields inherited from interface choco.kernel.solver.propagation.queue.EventQueue |
---|
LOGGER |
Constructor Summary | |
---|---|
VariableEventQueue()
|
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 |
---|
protected Queue<PropagationEvent> queue
protected PropagationEvent lastPopped
Constructor Detail |
---|
public VariableEventQueue()
Method Detail |
---|
public void clear()
clear
in interface EventQueue
public boolean isEmpty()
isEmpty
in interface EventQueue
public void propagateAllEvents() throws ContradictionException
propagateAllEvents
in interface EventQueue
ContradictionException
public void propagateOneEvent() throws ContradictionException
propagateOneEvent
in interface EventQueue
ContradictionException
public PropagationEvent popEvent()
popEvent
in interface EventQueue
public boolean pushEvent(PropagationEvent event)
pushEvent
in interface EventQueue
public void flushEventQueue()
flushEventQueue
in interface EventQueue
public boolean remove(PropagationEvent event)
remove
in interface EventQueue
public int size()
EventQueue
size
in interface EventQueue
public PropagationEvent get(int idx)
EventQueue
get
in interface EventQueue
idx
- the index of the event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |