jopt.csp.spi.arcalgorithm.util
Class NodeQueue

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.util.NodeQueue

public class NodeQueue
extends java.lang.Object

Represents a queue of nodes to be propagated


Constructor Summary
NodeQueue()
          Constructor
 
Method Summary
 void add(Node node)
          Adds an node to the queue
 void add(Node node, int eventType)
          Adds an node change to the queue
 void add(Node node, int eventType, ArcQueue arcs)
          Adds a node change to the queue.
 void addArc(Arc arc)
          Adds source nodes of arc to queue
 void addBinaryArc(BinaryArc arc)
          Adds source nodes of a binary arc to the queue
 void addGenericArc(GenericArc arc)
          Adds source nodes of a generic arc to the queue
 void addHyperArc(HyperArc arc)
          Adds source nodes of a hyper arc to the queue
 void addNodeArc(NodeArc arc)
          Adds source nodes of a node arc to the queue
 void addScheduleArc(SchedulerArc arc)
          Adds source nodes of a schedule arc to the queue
 void clear()
          Removes all nodes in the queue
 boolean contains(Node n)
          Returns true if a node is in the queue
 ArcQueue getCurrentArcs()
          Returns the current arc list associated with the last retrieved node
 boolean hasNext()
          Returns true if queue has a next arc available
 Node next()
          Returns next node on queue or null if none is available
 NodeChangeEvent nextChange()
          Returns next node change on queue or null if none is available
 NodeChangeEvent remove(Node node)
          Removes a node change from the queue
 int size()
          Returns size of arc queue
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeQueue

public NodeQueue()
Constructor

Method Detail

clear

public void clear()
Removes all nodes in the queue


contains

public boolean contains(Node n)
Returns true if a node is in the queue


size

public int size()
Returns size of arc queue


hasNext

public boolean hasNext()
Returns true if queue has a next arc available


next

public Node next()
Returns next node on queue or null if none is available


nextChange

public NodeChangeEvent nextChange()
Returns next node change on queue or null if none is available


getCurrentArcs

public ArcQueue getCurrentArcs()
Returns the current arc list associated with the last retrieved node


add

public void add(Node node)
Adds an node to the queue


add

public void add(Node node,
                int eventType,
                ArcQueue arcs)
Adds a node change to the queue. If the node is already in the queue and the eventType is the same or lower than the existing eventType, no change occurs. If, however, the new eventType is higher (more specific) than the existing eventType, the eventType is upgraded and the new arc queue overwrites the existing arc queue associated with the node (even if the new arc queue is null).


add

public void add(Node node,
                int eventType)
Adds an node change to the queue


addNodeArc

public void addNodeArc(NodeArc arc)
Adds source nodes of a node arc to the queue


addBinaryArc

public void addBinaryArc(BinaryArc arc)
Adds source nodes of a binary arc to the queue


addHyperArc

public void addHyperArc(HyperArc arc)
Adds source nodes of a hyper arc to the queue


addGenericArc

public void addGenericArc(GenericArc arc)
Adds source nodes of a generic arc to the queue


addScheduleArc

public void addScheduleArc(SchedulerArc arc)
Adds source nodes of a schedule arc to the queue


addArc

public void addArc(Arc arc)
Adds source nodes of arc to queue


remove

public NodeChangeEvent remove(Node node)
Removes a node change from the queue


toString

public java.lang.String toString()