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