|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a graph that tracks all nodes and arcs within a CLP problem. The graph can be used by an AC algorithm in order to ensure node consistency. The graph is required to track source node dependencies so that an algorithm can determine what arcs should be propagated in response to different types of node changes. A domain sourced arc is the most basic type of arc. Any changes to the source node should cause the connect arc to be propagated. A range arc is one that only needs to be propagated when the minimum or maximum value of the source node changes. For example, if an arc only needs to ensure that the target node is greater than the source node, the arc only needs to be propagated when the minimum value for the source node changes. A value arc is one that only needs to be propagated when the source node is bound. This is useful for arcs such as source != target where the values to remove from the target cannot be determined until source is bound.
Method Summary | |
void |
addArc(Arc arc)
Adds an arc to the graph and connects all nodes contained within it |
void |
addNode(Node node)
Adds a node to the set of nodes contained in this graph |
boolean |
containsNode(Node node)
Returns true if graph contains specific node |
java.util.Set |
getAllArcs()
Returns all the arcs contained in the graph |
java.util.Set |
getAllNodes()
Returns all the nodes contained in the graph |
java.util.Set |
getDomainSourceArcs(Node node)
Retrieves a set of domain dependent source arcs for node |
java.lang.Object |
getGraphState()
Returns an object containing current state of the graph: the arcs and nodes in the graph along with domain information of the nodes. |
java.util.Set |
getRangeSourceArcs(Node node)
Retrieves a set of range dependent source arcs for node |
java.util.Set |
getValueSourceArcs(Node node)
Retrieves a set of value dependent source arcs for node |
java.lang.String |
nodesDescription()
Returns string with node information that can be compared for a change to the graph |
void |
restoreGraphState(java.lang.Object state)
Restores the current state of the graph. |
void |
setChoicePointStack(ChoicePointStack cps)
Sets the choicepoint stack associated with this graph Can only be set once |
Method Detail |
public void addNode(Node node)
public void addArc(Arc arc)
public java.util.Set getValueSourceArcs(Node node)
public java.util.Set getRangeSourceArcs(Node node)
public java.util.Set getDomainSourceArcs(Node node)
public boolean containsNode(Node node)
public void setChoicePointStack(ChoicePointStack cps)
public java.util.Set getAllNodes()
public java.util.Set getAllArcs()
public java.lang.Object getGraphState()
restoreGraphState
method.
public void restoreGraphState(java.lang.Object state)
public java.lang.String nodesDescription()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |