choco.kernel.solver.propagation.queue
Interface EventQueue

All Known Implementing Classes:
BlockingVarEventQueue, ConstraintEventQueue, ObservableVarEventQueue, VariableEventQueue

public interface EventQueue

An interface for all the implementations of var queues (Constraint awake, on Variable events for instance).


Field Summary
static Logger LOGGER
          Reference to the root Logger, an object for logging trace statements related to propagation events (using the java.util.logging package)
 
Method Summary
 void clear()
          Clear datastructures for safe reuses
 void flushEventQueue()
          Removes all the events and clears all the events if needed.
 PropagationEvent get(int idx)
          returns the i-th pending event in the queue
 boolean isEmpty()
          Checks if the queue is empty.
 PropagationEvent popEvent()
          Pops the next var to propagate.
 void propagateAllEvents()
          Propagate some events (one or several depending on the queue).
 void propagateOneEvent()
          Propagate one single event from the queue).
 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
 

Field Detail

LOGGER

static final Logger LOGGER
Reference to the root Logger, an object for logging trace statements related to propagation events (using the java.util.logging package)

Method Detail

isEmpty

boolean isEmpty()
Checks if the queue is empty.


clear

void clear()
Clear datastructures for safe reuses


popEvent

PropagationEvent popEvent()
Pops the next var to propagate.


pushEvent

boolean pushEvent(PropagationEvent event)
Adds an event to the queue.

Parameters:
event -

flushEventQueue

void flushEventQueue()
Removes all the events and clears all the events if needed.


remove

boolean remove(PropagationEvent event)
Removes an event.


propagateAllEvents

void propagateAllEvents()
                        throws ContradictionException
Propagate some events (one or several depending on the queue).

Throws:
ContradictionException

propagateOneEvent

void propagateOneEvent()
                       throws ContradictionException
Propagate one single event from the queue).

Throws:
ContradictionException

size

int size()
returns the number of pending events in the queue

Returns:
the number of pending events in the queue

get

PropagationEvent get(int idx)
returns the i-th pending event in the queue

Parameters:
idx - the index of the event
Returns:
null if the index is inproper (idx<0 or idx>=size())


Copyright © 2012. All Rights Reserved.