jopt.csp.spi.arcalgorithm.graph.node
Interface Node

All Superinterfaces:
ChoicePointDataSource, Storable
All Known Subinterfaces:
NumNode, SetNode
All Known Implementing Classes:
AbstractNode, DoubleNode, FloatNode, IntNode, IntSetNode, LongNode

public interface Node
extends ChoicePointDataSource, Storable


Method Summary
 void addedToGraph()
          Indicates to node when it is added to a graph
 boolean choicePointStackSet()
          Returns true if a call to setChoicePointStack will fail
 void clearDelta()
          Clears the delta set for this node's domain
 java.lang.String getName()
          Returns name of node
 int getSize()
          Returns size of domain for this node.
 boolean inGraph()
          Returns true if a node is connected to a graph
 boolean isBound()
          Returns true if domain for this node is bound
 boolean isInDomain(java.lang.Object val)
          Returns true if a value is contained in this node's domain
 void removedFromGraph()
          Indicates to node when it is disconnected from a graph
 void setChoicePointStack(ChoicePointStack cps)
          Sets the choicepoint stack associated with this graph Can only be set once
 void setName(java.lang.String name)
          Sets name of node
 
Methods inherited from interface jopt.csp.spi.util.Storable
getState, restoreState
 

Method Detail

getName

public java.lang.String getName()
Returns name of node

Specified by:
getName in interface Storable

setName

public void setName(java.lang.String name)
Sets name of node


isBound

public boolean isBound()
Returns true if domain for this node is bound


isInDomain

public boolean isInDomain(java.lang.Object val)
Returns true if a value is contained in this node's domain


getSize

public int getSize()
Returns size of domain for this node. If domain is infinite, value is Integer.MAX_VALUE


clearDelta

public void clearDelta()
Clears the delta set for this node's domain


setChoicePointStack

public void setChoicePointStack(ChoicePointStack cps)
Sets the choicepoint stack associated with this graph Can only be set once

Specified by:
setChoicePointStack in interface ChoicePointDataSource

choicePointStackSet

public boolean choicePointStackSet()
Returns true if a call to setChoicePointStack will fail

Specified by:
choicePointStackSet in interface ChoicePointDataSource

inGraph

public boolean inGraph()
Returns true if a node is connected to a graph


addedToGraph

public void addedToGraph()
Indicates to node when it is added to a graph


removedFromGraph

public void removedFromGraph()
Indicates to node when it is disconnected from a graph