|
|||||||||||
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.LongNode
Node for long numeric domains
Nested Class Summary |
Nested classes inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode |
AbstractNode.DomainListener |
Constructor Summary | |
LongNode()
Constructor that gives the node a unique name and a domain from Long.MIN_VALUE to Long.MAX_VALUE |
|
LongNode(java.lang.String name,
LongDomain domain)
Constructor |
Method Summary | |
boolean |
choicePointStackSet()
Returns true if a call to setChoicePointStack will fail |
void |
clearDelta()
Clears the delta set for this node's domain |
jopt.csp.util.NumberIterator |
deltaValues()
Returns iterator of values in node's delta |
jopt.csp.util.NumSet |
getDomain()
Returns domain of node as a set of Number and NumInterval objects |
java.lang.Number |
getMax()
Returns the maximum domain value for this node |
java.lang.Number |
getMin()
Returns the minimum domain value for this node |
java.lang.Number |
getNextHigher(java.lang.Number n)
Returns the next higher domain value for a given n. |
java.lang.Number |
getNextLower(java.lang.Number n)
Returns the next lower domain value for a given n. |
int |
getNumberType()
Returns the type of number this node is based on. |
java.lang.Number |
getNumMax()
Returns the maximum domain value for this expression |
java.lang.Number |
getNumMin()
Returns the minimum domain value for this expression |
double |
getPrecision()
Returns precision associated with this domain for real numbers |
int |
getSize()
Returns size of domain for this node. |
java.lang.Object |
getState()
Stores appropriate data for future restoration. |
boolean |
isBound()
Returns true if domain for this node is bound to a single value |
boolean |
isInDomain(java.lang.Number val)
Returns true if value is in domain |
boolean |
isInDomain(java.lang.Object n)
Returns true if a value n is contained in this node's domain |
void |
removeDomain(jopt.csp.util.NumSet s)
Removes all values in this node's domain contained within set S |
void |
removeRange(java.lang.Number start,
java.lang.Number end)
Removes a range of values from the domain of this node |
void |
removeValue(java.lang.Number n)
Removes a single value from the domain of this node |
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 |
setDomain(jopt.csp.util.NumSet s)
Restricts node's domain to values contained within set S |
void |
setMax(java.lang.Number n)
Restricts domain to all values less than or equal to value given |
void |
setMin(java.lang.Number n)
Restricts domain to all values greater than or equal to value given |
void |
setRange(java.lang.Number start,
java.lang.Number end)
Restricts domain of this node to a range of values |
void |
setValue(java.lang.Number n)
Restricts domain to a single value |
java.lang.String |
toString()
Returns string representation of node |
jopt.csp.util.NumberIterator |
values()
Returns iterator of values in node's domain |
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 |
Methods inherited from interface jopt.csp.spi.arcalgorithm.graph.node.Node |
addedToGraph, getName, inGraph, removedFromGraph, setName |
Methods inherited from interface jopt.csp.spi.arcalgorithm.graph.node.NodeChangeSource |
addDomainChangeListener, addRangeChangeListener, addValueChangeListener, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener |
Constructor Detail |
public LongNode(java.lang.String name, LongDomain domain)
public LongNode()
Method Detail |
public double getPrecision()
getPrecision
in interface NumNode
public java.lang.Number getMax()
getMax
in interface NumNode
public java.lang.Number getMin()
getMin
in interface NumNode
public java.lang.Number getNumMax()
TrigExpr
getNumMax
in interface TrigExpr
public java.lang.Number getNumMin()
TrigExpr
getNumMin
in interface TrigExpr
public boolean isInDomain(java.lang.Number val)
isInDomain
in interface NumNode
public java.lang.Number getNextHigher(java.lang.Number n)
getNextHigher
in interface NumNode
public java.lang.Number getNextLower(java.lang.Number n)
getNextLower
in interface NumNode
public boolean isBound()
isBound
in interface Node
public boolean isInDomain(java.lang.Object n)
isInDomain
in interface Node
public int getSize()
getSize
in interface Node
public jopt.csp.util.NumberIterator values()
values
in interface NumNode
public jopt.csp.util.NumberIterator deltaValues()
deltaValues
in interface NumNode
public void setMax(java.lang.Number n) throws jopt.csp.variable.PropagationFailureException
setMax
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setMin(java.lang.Number n) throws jopt.csp.variable.PropagationFailureException
setMin
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeValue(java.lang.Number n) throws jopt.csp.variable.PropagationFailureException
removeValue
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setValue(java.lang.Number n) throws jopt.csp.variable.PropagationFailureException
setValue
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeRange(java.lang.Number start, java.lang.Number end) throws jopt.csp.variable.PropagationFailureException
removeRange
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setRange(java.lang.Number start, java.lang.Number end) throws jopt.csp.variable.PropagationFailureException
setRange
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeDomain(jopt.csp.util.NumSet s) throws jopt.csp.variable.PropagationFailureException
removeDomain
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setDomain(jopt.csp.util.NumSet s) throws jopt.csp.variable.PropagationFailureException
setDomain
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic jopt.csp.util.NumSet getDomain()
getDomain
in interface NumNode
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void clearDelta()
clearDelta
in interface Node
public void setChoicePointStack(ChoicePointStack cps)
setChoicePointStack
in interface Node
public boolean choicePointStackSet()
choicePointStackSet
in interface Node
public java.lang.String toString()
public java.lang.Object getState()
getState
in interface Storable
public void restoreState(java.lang.Object state)
restoreState
in interface Storable
public int getNumberType()
getNumberType
in interface NumNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |