|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.arcalgorithm.variable.VariableChangeBase jopt.csp.spi.arcalgorithm.variable.NumExprBase jopt.csp.spi.arcalgorithm.variable.GenericNumExprBase
A generic variable such as Xi which represents X1, X2, etc.
Method Summary | |
void |
addVariableChangeListener(VariableChangeListener listener)
Adds a listener interested in variable change events |
boolean |
containsIndex(GenericIndex index)
Returns true if this expression contains the given index |
NumExpr |
createFragment(GenericIndex[] fragIndices)
Returns a fragment of this expression given an array of indices that represent the portion of the fragment. |
Arc[] |
getBooleanSourceArcs()
Returns array of arcs that will affect the boolean true / false value of this constraint upon a change |
int |
getExpressionCount()
Returns the number of expressions that are wrapped by this generic node |
NumNode[] |
getExpressionNodes()
Returns the nodes for all expressions in the internal array |
GenericIndex[] |
getGenericIndices()
Returns the generic indices that is associated with this expression |
jopt.csp.variable.CspGenericIndex[] |
getIndices()
Returns the generic indices that is associated with this expression |
java.lang.Number |
getNextHigher(java.lang.Number val)
Returns the next higher value in this variable's domain or current value if none exists |
java.lang.Number |
getNextLower(java.lang.Number val)
Returns the next lower value in this variable's domain or current value if none exists |
NumExpr |
getNumExpression(int offset)
returns a numeric expression from the internal array |
NumExpr |
getNumExpressionForIndex()
Returns the internal variable corresponding to the associated index's current value |
java.lang.Number |
getNumLargestMax()
Returns that largest maximal value of all variables in array |
java.lang.Number |
getNumLargestMax(int start,
int end)
Returns that largest maximal value of all variables in array within start and end indices |
java.lang.Number |
getNumLargestMin()
Returns that largest minimal value of all variables in array |
java.lang.Number |
getNumLargestMin(int start,
int end)
Returns that largest minimal value of all variables in array within start and end indices |
java.lang.Number |
getNumMax()
Returns maximum value of node |
java.lang.Number |
getNumMin()
Returns minimal value of node |
java.lang.Number |
getNumSmallestMax()
Returns that smallest maximal value of all variables in array |
java.lang.Number |
getNumSmallestMax(int start,
int end)
Returns that smallest maximal value of all variables in array within start and end indices |
java.lang.Number |
getNumSmallestMin()
Returns that smallest minimal value of all variables in array |
java.lang.Number |
getNumSmallestMin(int start,
int end)
Returns that smallest minimal value of all variables in array within start and end indices |
double |
getPrecision()
Returns precision associated with this domain |
boolean |
isBound()
Returns true if all internal expressions are bound |
boolean |
isInDomain(java.lang.Number n)
Returns true if value is in domain of this expression |
void |
removeVariableChangeListener(VariableChangeListener listener)
Removes a variable listener from this variable |
void |
setIndicesToVariableOffset(int offset)
Updates associated indices to values corresponding to the node offset in the internal array |
void |
setPrecision(double p)
Sets precision associated with this domain |
java.lang.String |
toString()
Displays name of variable along with indices |
void |
updateGraph(NodeArcGraph graph)
Adds arcs representing this expression to the node arc graph |
Methods inherited from class jopt.csp.spi.arcalgorithm.variable.NumExprBase |
between, between, between, between, eq, equals, geq, getDomain, getName, getNodeCollection, gt, hashCode, leq, lt, neq, notBetween, notBetween, notBetween, notBetween, setName |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jopt.csp.spi.arcalgorithm.constraint.num.NumExpr |
getName, getNode, getNodeCollection, getNumberType |
Method Detail |
public Arc[] getBooleanSourceArcs()
getBooleanSourceArcs
in interface NumExpr
getBooleanSourceArcs
in class NumExprBase
public NumNode[] getExpressionNodes()
public void setPrecision(double p)
setPrecision
in interface NumExpr
public double getPrecision()
getPrecision
in interface NumExpr
public jopt.csp.variable.CspGenericIndex[] getIndices()
public GenericIndex[] getGenericIndices()
getGenericIndices
in interface GenericNumExpr
public boolean containsIndex(GenericIndex index)
containsIndex
in interface GenericNumExpr
public boolean isBound()
isBound
in interface NumExpr
isBound
in class NumExprBase
public NumExpr getNumExpressionForIndex()
getNumExpressionForIndex
in interface GenericNumExpr
public int getExpressionCount()
getExpressionCount
in interface GenericNumExpr
public NumExpr getNumExpression(int offset)
getNumExpression
in interface GenericNumExpr
offset
- Offset of expression in internal expression arraypublic java.lang.String toString()
toString
in class NumExprBase
public void addVariableChangeListener(VariableChangeListener listener)
addVariableChangeListener
in interface VariableChangeSource
addVariableChangeListener
in class NumExprBase
public void removeVariableChangeListener(VariableChangeListener listener)
removeVariableChangeListener
in interface VariableChangeSource
removeVariableChangeListener
in class NumExprBase
public void updateGraph(NodeArcGraph graph)
updateGraph
in interface NumExpr
updateGraph
in class NumExprBase
public java.lang.Number getNumLargestMax()
getNumLargestMax
in interface GenericNumExpr
public final java.lang.Number getNumMin()
getNumMin
in interface NumExpr
public final java.lang.Number getNumMax()
getNumMax
in interface NumExpr
public java.lang.Number getNumLargestMax(int start, int end)
getNumLargestMax
in interface GenericNumExpr
public java.lang.Number getNumSmallestMax()
getNumSmallestMax
in interface GenericNumExpr
public java.lang.Number getNumSmallestMax(int start, int end)
getNumSmallestMax
in interface GenericNumExpr
public java.lang.Number getNumLargestMin()
getNumLargestMin
in interface GenericNumExpr
public java.lang.Number getNumLargestMin(int start, int end)
getNumLargestMin
in interface GenericNumExpr
public java.lang.Number getNumSmallestMin()
getNumSmallestMin
in interface GenericNumExpr
public java.lang.Number getNumSmallestMin(int start, int end)
getNumSmallestMin
in interface GenericNumExpr
public final void setIndicesToVariableOffset(int offset)
public java.lang.Number getNextHigher(java.lang.Number val)
NumExpr
getNextHigher
in interface NumExpr
public java.lang.Number getNextLower(java.lang.Number val)
NumExpr
getNextLower
in interface NumExpr
public boolean isInDomain(java.lang.Number n)
TrigExpr
isInDomain
in interface TrigExpr
public final NumExpr createFragment(GenericIndex[] fragIndices)
GenericNumExpr
createFragment
in interface GenericNumExpr
fragIndices
- Indices that represent the fragment to return. Each index
must have a current value for this function to work correctly
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |