|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.arcalgorithm.graph.node.AbstractNode jopt.csp.spi.arcalgorithm.graph.node.GenericBooleanNode
A generic node relating to a generic variable such as Xi which represents X1, X2, etc.
Nested Class Summary |
Nested classes inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode |
AbstractNode.DomainListener |
Constructor Summary | |
GenericBooleanNode(java.lang.String name,
GenericIndex[] indices,
BooleanNode[] nodes)
Constructor |
Method Summary | |
void |
afterChoicePointPopEvent()
Indicates that the current choice point has been rolled back and domain data must be reset |
void |
afterChoicePointPushEvent()
Indicates that current choice point has been updated and domain data must be restored |
void |
beforeChoicePointPopEvent()
Indicates that the current choice point is about to be rolled back and domain data must be reset |
void |
beforeChoicePointPushEvent()
Indicates that current choice point is about to be pushed to allow data to be recorded in stack |
boolean |
choicePointStackSet()
Returns true if a call to setChoicePointStack will fail |
void |
clearDelta()
Clears the delta set for this node's domain |
int |
domainModifiedMaxOffset()
Returns maximum offset of a node having a domain-modification |
int |
domainModifiedMinOffset()
Returns minimum offset of a node having a domain-modification |
GenericIndex[] |
getIndices()
Returns the generic index that is associated with this node |
Node |
getNode(int offset)
Returns a node from the internal array |
int |
getNodeCount()
Returns the number of nodes that are wrapped by this generic node |
Node |
getNodeForIndex()
Returns the internal node corresponding to the associated index's current value |
int |
getSize()
Returns size of domain for this node. |
java.lang.Object |
getState()
Stores appropriate data for future restoration. |
boolean |
isAllFalse()
Returns true if all nodes in the array evaluate to false |
boolean |
isAllFalse(int s,
int e)
Returns true if all nodes in the array evaluate to false within start and end indices |
boolean |
isAllTrue()
Returns true if all nodes in the array evaluate to true |
boolean |
isAllTrue(int s,
int e)
Returns true if all nodes in the array evaluate to true within start and end indices |
boolean |
isAnyFalse()
Returns true if any node in the array evaluates to false |
boolean |
isAnyFalse(int s,
int e)
Returns true if any node in the array evaluates to false within start and end indices |
boolean |
isAnyTrue()
Returns true if any node in the array evaluates to false |
boolean |
isAnyTrue(int s,
int e)
Returns true if any node in the array evaluates to true within start and end indices |
boolean |
isBound()
Returns true if all internal nodes are bound |
boolean |
isInDomain(java.lang.Object val)
Returns true if a value is contained in this node's domain |
boolean |
isOverRealInterval()
Returns true if domain of node is over real intervals |
void |
nodeChange(NodeChangeEvent ev)
Called by internally wrapped node when it is altered. |
void |
restoreState(java.lang.Object state)
Restores variable information from stored data. |
void |
setChoicePointStack(ChoicePointStack cps)
Sets the choicepoint stack associated with this graph Can only be set once |
void |
setIndicesToNodeOffset(int offset)
Updates associated indices to values corresponding to the node offset in the internal array |
java.util.Iterator |
values()
|
Methods inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode |
addDomainChangeListener, addedToGraph, addRangeChangeListener, addValueChangeListener, equals, getName, hashCode, inGraph, removedFromGraph, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener, setName |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericBooleanNode(java.lang.String name, GenericIndex[] indices, BooleanNode[] nodes)
name
- unique name of this nodeindices
- array of indices that generic node is based uponnodes
- array of nodes that this generic node wrapsMethod Detail |
public boolean isBound()
isBound
in interface Node
public GenericIndex[] getIndices()
GenericNode
getIndices
in interface GenericNode
public Node getNodeForIndex()
GenericNode
getNodeForIndex
in interface GenericNode
public int getNodeCount()
GenericNode
getNodeCount
in interface GenericNode
public Node getNode(int offset)
GenericNode
getNode
in interface GenericNode
offset
- Offset of node in internal node arraypublic boolean isInDomain(java.lang.Object val)
isInDomain
in interface Node
public int getSize()
getSize
in interface Node
public java.util.Iterator values()
public boolean isOverRealInterval()
public void nodeChange(NodeChangeEvent ev)
nodeChange
in interface NodeChangeListener
public void clearDelta()
clearDelta
in interface Node
public void setChoicePointStack(ChoicePointStack cps)
setChoicePointStack
in interface Node
public boolean choicePointStackSet()
choicePointStackSet
in interface Node
public void beforeChoicePointPopEvent()
ChoicePointEntryListener
beforeChoicePointPopEvent
in interface ChoicePointEntryListener
public void afterChoicePointPopEvent()
ChoicePointEntryListener
afterChoicePointPopEvent
in interface ChoicePointEntryListener
public void beforeChoicePointPushEvent()
ChoicePointEntryListener
beforeChoicePointPushEvent
in interface ChoicePointEntryListener
public void afterChoicePointPushEvent()
ChoicePointEntryListener
afterChoicePointPushEvent
in interface ChoicePointEntryListener
public java.lang.Object getState()
getState
in interface Storable
public void restoreState(java.lang.Object state)
restoreState
in interface Storable
public void setIndicesToNodeOffset(int offset)
GenericNode
setIndicesToNodeOffset
in interface GenericNode
public int domainModifiedMinOffset()
public int domainModifiedMaxOffset()
public boolean isAnyFalse()
public boolean isAnyFalse(int s, int e)
public boolean isAllFalse()
public boolean isAllFalse(int s, int e)
public boolean isAnyTrue()
public boolean isAnyTrue(int s, int e)
public boolean isAllTrue()
public boolean isAllTrue(int s, int e)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |