|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface implemented by long integer based variables. A domain is associated with this type of variable that can be modified unlike CspLongExpr objects.
| Method Summary | |
long |
getMax()
Returns the maximum value of this variable's domain |
long |
getMin()
Returns the minimum value of this variable's domain |
long |
getNextHigher(long val)
Returns the next higher value in this variable's domain or current value if none exists |
long |
getNextLower(long val)
Returns the next lower value in this variable's domain or current value if none exists |
boolean |
isInDomain(long val)
Returns true if the specified value is in this variable's domain |
void |
removeAll(LongSet set)
Attempts to reduce this variable's domain by removing a set of values |
void |
removeRange(long start,
long end)
Attempts to reduce this variable's domain by removing a range of values |
void |
removeValue(long val)
Attempts to remove a single value from this variable's domain |
void |
setMax(long val)
Attempts to reduce this variable's domain to be less than the specified maximum value. |
void |
setMin(long val)
Attempts to reduce this variable's domain to be less than the specified minimum value. |
void |
setRange(long start,
long end)
Attempts to reduce this variable's domain to within a range of values |
void |
setValue(long val)
Attempts to reduce this variable's domain to a single value. |
| Methods inherited from interface jopt.csp.variable.CspLongExpr |
add, add, add, add, add, add, between, between, divide, divide, divide, divide, divide, divide, eq, eq, geq, geq, gt, gt, leq, leq, lt, lt, multiply, multiply, multiply, multiply, multiply, multiply, neq, neq, notBetween, notBetween, subtract, subtract, subtract, subtract, subtract, subtract |
| Methods inherited from interface jopt.csp.variable.CspNumExpr |
between, between, between, between, eq, geq, getName, gt, isBound, leq, lt, neq, notBetween, notBetween, notBetween, notBetween, setName |
| Methods inherited from interface jopt.csp.variable.CspVariable |
getName, getSize, isBound |
| Method Detail |
public long getMax()
getMax in interface CspLongExprpublic long getMin()
getMin in interface CspLongExprpublic boolean isInDomain(long val)
val - value to check if it is in this variable's domain
public void setMax(long val)
throws PropagationFailureException
val - long value to set as the domain's maximum value
PropagationFailureException - If this would cause the
domain to become empty
public void setMin(long val)
throws PropagationFailureException
val - long value to set as the domain's minimum value
PropagationFailureException - If this would cause the
domain to become empty
public void setValue(long val)
throws PropagationFailureException
val - long value to set as the domain's only value
PropagationFailureException - If this would cause the
domain to become empty
public void removeValue(long val)
throws PropagationFailureException
val - long value to remove from the domain
PropagationFailureException - If this would cause the
domain to become empty
public void removeAll(LongSet set)
throws PropagationFailureException
set - set of values to remove from the domain
PropagationFailureException - If this would cause the
domain to become empty
public void setRange(long start,
long end)
throws PropagationFailureException
start - long value to set as the domain's minimum valueend - long value to set as the domain's maximum value
PropagationFailureException - If this would cause the
domain to become empty
public void removeRange(long start,
long end)
throws PropagationFailureException
start - minimum value of the range of values to be removed from the domainend - maximum value of the range of values to be removed from the domain
PropagationFailureException - If this would cause the
domain to become emptypublic long getNextHigher(long val)
val - value of which to obtain the next higher
public long getNextLower(long val)
val - value of which to obtain the next lower
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||