|
|||||||||||
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.GenericNumNode
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 | |
GenericNumNode(java.lang.String name,
GenericIndex[] indices,
NumNode[] nodes,
int nodeType)
Constructor |
Method Summary | |
void |
addInternalRangeChangeListener(NodeChangeListener listener)
Adds a listener to this node's internal nodes interested in range and value events |
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 |
java.lang.Number |
getLargestMax()
Returns that largest maximal value of all variables in array |
java.lang.Number |
getLargestMax(int start,
int end)
Returns that largest maximal value of all variables in array within start and end indices |
java.lang.Number |
getLargestMin()
Returns that largest minimal value of all variables in array |
java.lang.Number |
getLargestMin(int start,
int end)
Returns that largest minimal value of all variables in array within start and end indices |
java.lang.Number |
getMax()
Returns maximum value of node |
java.lang.Number |
getMin()
Returns minimal value of 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 |
NumNode[] |
getNodes()
Returns all the nodes wrapped by this generic node |
abstract int |
getNumberType()
Returns the type of number this node is based on. |
double |
getPrecision()
Returns precision associated with this domain |
int |
getSize()
Returns size of domain for this node. |
java.lang.Number |
getSmallestMax()
Returns that smallest maximal value of all variables in array |
java.lang.Number |
getSmallestMax(int start,
int end)
Returns that smallest maximal value of all variables in array within start and end indices |
java.lang.Number |
getSmallestMin()
Returns that smallest minimal value of all variables in array |
java.lang.Number |
getSmallestMin(int start,
int end)
Returns that smallest minimal value of all variables in array within start and end indices |
java.lang.Object |
getState()
Stores appropriate data for future restoration. |
boolean |
isAnyBound()
Returns true if any internal node is bound |
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. |
int |
rangeModifiedMaxOffset()
Returns maximum offset of a node having a range-modification |
int |
rangeModifiedMinOffset()
Returns minimum offset of a node having a range-modification |
void |
restoreState(java.lang.Object state)
Restores variable information from stored data. |
void |
setChoicePointEventListener(ChoicePointEventListener cpel)
|
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.lang.String |
toString()
Displays name of node along with indices |
int |
valueModifiedMaxOffset()
Returns maximum offset of a node having a value-modification |
int |
valueModifiedMinOffset()
Returns minimum offset of a node having a value-modification |
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, wait, wait, wait |
Constructor Detail |
public GenericNumNode(java.lang.String name, GenericIndex[] indices, NumNode[] nodes, int nodeType)
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 boolean isAnyBound()
public double getPrecision()
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 NumNode[] getNodes()
public java.lang.Number getLargestMax()
public java.lang.Number getMin()
public java.lang.Number getMax()
public java.lang.Number getLargestMax(int start, int end)
public java.lang.Number getSmallestMax()
public java.lang.Number getSmallestMax(int start, int end)
public java.lang.Number getLargestMin()
public java.lang.Number getLargestMin(int start, int end)
public java.lang.Number getSmallestMin()
public java.lang.Number getSmallestMin(int start, int end)
public 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 valueModifiedMinOffset()
public int valueModifiedMaxOffset()
public int rangeModifiedMinOffset()
public int rangeModifiedMaxOffset()
public int domainModifiedMinOffset()
public int domainModifiedMaxOffset()
public void setChoicePointEventListener(ChoicePointEventListener cpel)
public void addInternalRangeChangeListener(NodeChangeListener listener)
public java.lang.String toString()
public abstract int getNumberType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |