jopt.csp.variable
Interface CspIntExpr

All Superinterfaces:
CspNumExpr
All Known Subinterfaces:
CspBooleanExpr, CspBooleanVariable, CspGenericBooleanExpr, CspGenericIntExpr, CspIntVariable

public interface CspIntExpr
extends CspNumExpr

Interface implemented by integer based numeric expressions. The domain of this type of object is computed and changes to it will have no effect.


Method Summary
 CspDoubleExpr add(CspDoubleExpr expr)
          Returns an expression representing the sum of this expression with another expression
 CspFloatExpr add(CspFloatExpr expr)
          Returns an expression representing the sum of this expression with another expression
 CspIntExpr add(CspIntExpr expr)
          Returns an expression representing the sum of this expression with another expression
 CspLongExpr add(CspLongExpr expr)
          Returns an expression representing the sum of this expression with another expression
 CspDoubleExpr add(double d)
          Returns an expression representing the sum of this expression with a static value
 CspFloatExpr add(float f)
          Returns an expression representing the sum of this expression with a static value
 CspIntExpr add(int i)
          Returns an expression representing the sum of this expression with a static value
 CspLongExpr add(long l)
          Returns an expression representing the sum of this expression with a static value
 CspConstraint between(int min, boolean minExclusive, int max, boolean maxExclusive)
          Returns a constraint restricting this expression to be between a min and max.
 CspConstraint between(int min, int max)
          Returns a constraint restricting this expression to be between or equal min and max.
 CspDoubleExpr divide(CspDoubleExpr expr)
          Returns an expression representing the quotient of this expression with another expression
 CspFloatExpr divide(CspFloatExpr expr)
          Returns an expression representing the quotient of this expression with another expression
 CspIntExpr divide(CspIntExpr expr)
          Returns an expression representing the quotient of this expression with another expression
 CspLongExpr divide(CspLongExpr expr)
          Returns an expression representing the quotient of this expression with another expression
 CspDoubleExpr divide(double d)
          Returns an expression representing the quotient of this expression with a static value
 CspFloatExpr divide(float f)
          Returns an expression representing the quotient of this expression with a static value
 CspIntExpr divide(int i)
          Returns an expression representing the quotient of this expression with a static value
 CspLongExpr divide(long l)
          Returns an expression representing the quotient of this expression with a static value
 CspConstraint eq(CspGenericIntConstant val)
          Returns constraint restricting this expression to a value
 CspConstraint eq(int val)
          Returns constraint restricting this expression to a value
 CspConstraint geq(CspGenericIntConstant val)
          Returns constraint restricting this expression to values above and including a given minimum
 CspConstraint geq(int val)
          Returns constraint restricting this expression to values above and including a given minimum
 int getMax()
          Returns the maximum value of the expression
 int getMin()
          Returns the minimal value of the expression
 CspConstraint gt(CspGenericIntConstant val)
          Returns constraint restricting this expression to values above a given minimum
 CspConstraint gt(int val)
          Returns constraint restricting this expression to values above a given minimum
 CspConstraint leq(CspGenericIntConstant val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspConstraint leq(int val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspConstraint lt(CspGenericIntConstant val)
          Returns constraint restricting this expression to values below a given maximum
 CspConstraint lt(int val)
          Returns constraint restricting this expression to values below a given maximum
 CspDoubleExpr multiply(CspDoubleExpr expr)
          Returns an expression representing the product of this expression with another expression
 CspFloatExpr multiply(CspFloatExpr expr)
          Returns an expression representing the product of this expression with another expression
 CspIntExpr multiply(CspIntExpr expr)
          Returns an expression representing the product of this expression with another expression
 CspLongExpr multiply(CspLongExpr expr)
          Returns an expression representing the product of this expression with another expression
 CspDoubleExpr multiply(double d)
          Returns an expression representing the product of this expression with a static value
 CspFloatExpr multiply(float f)
          Returns an expression representing the product of this expression with a static value
 CspIntExpr multiply(int i)
          Returns an expression representing the product of this expression with a static value
 CspLongExpr multiply(long l)
          Returns an expression representing the product of this expression with a static value
 CspConstraint neq(CspGenericIntConstant val)
          Returns constraint restricting this expression to all values not equivalent to supplied value
 CspConstraint neq(int val)
          Returns constraint restricting this expression to all values not equivalent to supplied value
 CspConstraint notBetween(int min, boolean minExclusive, int max, boolean maxExclusive)
          Returns a constraint restricting this expression to not fall within a given range from a min to max value
 CspConstraint notBetween(int min, int max)
          Returns a constraint restricting this expression to not fall within a given range greater than or equal to a min value up to less than or equal a max value
 CspDoubleExpr subtract(CspDoubleExpr expr)
          Returns an expression representing the difference of this expression with another expression
 CspFloatExpr subtract(CspFloatExpr expr)
          Returns an expression representing the difference of this expression with another expression
 CspIntExpr subtract(CspIntExpr expr)
          Returns an expression representing the difference of this expression with another expression
 CspLongExpr subtract(CspLongExpr expr)
          Returns an expression representing the difference of this expression with another expression
 CspDoubleExpr subtract(double d)
          Returns an expression representing the difference of this expression with a static value
 CspFloatExpr subtract(float f)
          Returns an expression representing the difference of this expression with a static value
 CspIntExpr subtract(int i)
          Returns an expression representing the difference of this expression with a static value
 CspLongExpr subtract(long l)
          Returns an expression representing the difference of this expression with a static value
 
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
 

Method Detail

getMin

public int getMin()
Returns the minimal value of the expression

Returns:
the minimum value of this expression's domain

getMax

public int getMax()
Returns the maximum value of the expression

Returns:
the maximum value of this expression's domain

add

public CspIntExpr add(int i)
Returns an expression representing the sum of this expression with a static value

Parameters:
i - value to add to this expression
Returns:
expression representig this expression + i

add

public CspLongExpr add(long l)
Returns an expression representing the sum of this expression with a static value

Parameters:
l - value to add to this expression
Returns:
expression representig this expression + l

add

public CspFloatExpr add(float f)
Returns an expression representing the sum of this expression with a static value

Parameters:
f - value to add to this expression
Returns:
expression representig this expression + f

add

public CspDoubleExpr add(double d)
Returns an expression representing the sum of this expression with a static value

Parameters:
d - value to add to this expression
Returns:
expression representig this expression + d

add

public CspIntExpr add(CspIntExpr expr)
Returns an expression representing the sum of this expression with another expression

Parameters:
expr - expression to add to this expression
Returns:
expression representig this expression + expr

add

public CspLongExpr add(CspLongExpr expr)
Returns an expression representing the sum of this expression with another expression

Parameters:
expr - expression to add to this expression
Returns:
expression representig this expression + expr

add

public CspFloatExpr add(CspFloatExpr expr)
Returns an expression representing the sum of this expression with another expression

Parameters:
expr - expression to add to this expression
Returns:
expression representig this expression + expr

add

public CspDoubleExpr add(CspDoubleExpr expr)
Returns an expression representing the sum of this expression with another expression

Parameters:
expr - expression to add to this expression
Returns:
expression representig this expression + expr

subtract

public CspIntExpr subtract(int i)
Returns an expression representing the difference of this expression with a static value

Parameters:
i - value to subtract from this expression
Returns:
expression representig this expression - i

subtract

public CspLongExpr subtract(long l)
Returns an expression representing the difference of this expression with a static value

Parameters:
l - value to subtract from this expression
Returns:
expression representig this expression - l

subtract

public CspFloatExpr subtract(float f)
Returns an expression representing the difference of this expression with a static value

Parameters:
f - value to subtract from this expression
Returns:
expression representig this expression - f

subtract

public CspDoubleExpr subtract(double d)
Returns an expression representing the difference of this expression with a static value

Parameters:
d - value to subtract from this expression
Returns:
expression representig this expression - d

subtract

public CspIntExpr subtract(CspIntExpr expr)
Returns an expression representing the difference of this expression with another expression

Parameters:
expr - expression to subtract from this expression
Returns:
expression representig this expression - expr

subtract

public CspLongExpr subtract(CspLongExpr expr)
Returns an expression representing the difference of this expression with another expression

Parameters:
expr - expression to subtract from this expression
Returns:
expression representig this expression - expr

subtract

public CspFloatExpr subtract(CspFloatExpr expr)
Returns an expression representing the difference of this expression with another expression

Parameters:
expr - expression to subtract from this expression
Returns:
expression representig this expression - expr

subtract

public CspDoubleExpr subtract(CspDoubleExpr expr)
Returns an expression representing the difference of this expression with another expression

Parameters:
expr - expression to subtract from this expression
Returns:
expression representig this expression - expr

multiply

public CspIntExpr multiply(int i)
Returns an expression representing the product of this expression with a static value

Parameters:
i - value to multiply this expression by
Returns:
expression representig this expression * i

multiply

public CspLongExpr multiply(long l)
Returns an expression representing the product of this expression with a static value

Parameters:
l - value to multiply this expression by
Returns:
expression representig this expression * l

multiply

public CspFloatExpr multiply(float f)
Returns an expression representing the product of this expression with a static value

Parameters:
f - value to multiply this expression by
Returns:
expression representig this expression * f

multiply

public CspDoubleExpr multiply(double d)
Returns an expression representing the product of this expression with a static value

Parameters:
d - value to multiply this expression by
Returns:
expression representig this expression * d

multiply

public CspIntExpr multiply(CspIntExpr expr)
Returns an expression representing the product of this expression with another expression

Parameters:
expr - expression to multiply this expression by
Returns:
expression representig this expression * expr

multiply

public CspLongExpr multiply(CspLongExpr expr)
Returns an expression representing the product of this expression with another expression

Parameters:
expr - expression to multiply this expression by
Returns:
expression representig this expression * expr

multiply

public CspFloatExpr multiply(CspFloatExpr expr)
Returns an expression representing the product of this expression with another expression

Parameters:
expr - expression to multiply this expression by
Returns:
expression representig this expression * expr

multiply

public CspDoubleExpr multiply(CspDoubleExpr expr)
Returns an expression representing the product of this expression with another expression

Parameters:
expr - expression to multiply this expression by
Returns:
expression representig this expression * expr

divide

public CspIntExpr divide(int i)
Returns an expression representing the quotient of this expression with a static value

Parameters:
i - value to divide this expression by
Returns:
expression representig this expression / i

divide

public CspLongExpr divide(long l)
Returns an expression representing the quotient of this expression with a static value

Parameters:
l - value to divide this expression by
Returns:
expression representig this expression / l

divide

public CspFloatExpr divide(float f)
Returns an expression representing the quotient of this expression with a static value

Parameters:
f - value to divide this expression by
Returns:
expression representig this expression / f

divide

public CspDoubleExpr divide(double d)
Returns an expression representing the quotient of this expression with a static value

Parameters:
d - value to divide this expression by
Returns:
expression representig this expression / d

divide

public CspIntExpr divide(CspIntExpr expr)
Returns an expression representing the quotient of this expression with another expression

Parameters:
expr - expression to divide this expression by
Returns:
expression representig this expression / expr

divide

public CspLongExpr divide(CspLongExpr expr)
Returns an expression representing the quotient of this expression with another expression

Parameters:
expr - expression to divide this expression by
Returns:
expression representig this expression / expr

divide

public CspFloatExpr divide(CspFloatExpr expr)
Returns an expression representing the quotient of this expression with another expression

Parameters:
expr - expression to divide this expression by
Returns:
expression representig this expression / expr

divide

public CspDoubleExpr divide(CspDoubleExpr expr)
Returns an expression representing the quotient of this expression with another expression

Parameters:
expr - expression to divide this expression by
Returns:
expression representig this expression / expr

eq

public CspConstraint eq(int val)
Returns constraint restricting this expression to a value

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be equal to val

lt

public CspConstraint lt(int val)
Returns constraint restricting this expression to values below a given maximum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be less than val

leq

public CspConstraint leq(int val)
Returns constraint restricting this expression to values below and including a given maximum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be less than or equal to val

gt

public CspConstraint gt(int val)
Returns constraint restricting this expression to values above a given minimum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be greater than val

geq

public CspConstraint geq(int val)
Returns constraint restricting this expression to values above and including a given minimum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be greater than or equal to val

neq

public CspConstraint neq(int val)
Returns constraint restricting this expression to all values not equivalent to supplied value

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be not equal to val

eq

public CspConstraint eq(CspGenericIntConstant val)
Returns constraint restricting this expression to a value

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be equal to val

lt

public CspConstraint lt(CspGenericIntConstant val)
Returns constraint restricting this expression to values below a given maximum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be less than val

leq

public CspConstraint leq(CspGenericIntConstant val)
Returns constraint restricting this expression to values below and including a given maximum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be less than or equal to val

gt

public CspConstraint gt(CspGenericIntConstant val)
Returns constraint restricting this expression to values above a given minimum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be greater than val

geq

public CspConstraint geq(CspGenericIntConstant val)
Returns constraint restricting this expression to values above and including a given minimum

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be greater than or equal to val

neq

public CspConstraint neq(CspGenericIntConstant val)
Returns constraint restricting this expression to all values not equivalent to supplied value

Parameters:
val - value to constraint this expression to
Returns:
constraint constraining this expression to be not equal to val

between

public CspConstraint between(int min,
                             boolean minExclusive,
                             int max,
                             boolean maxExclusive)
Returns a constraint restricting this expression to be between a min and max.

Parameters:
min - value that this expression must be greater than
minExclusive - true if start of range does not include minimum value
max - value that this expression must be less than
maxExclusive - true if end of range does not include maximum value
Returns:
constraint restricting this expression to be between a min and max.

between

public CspConstraint between(int min,
                             int max)
Returns a constraint restricting this expression to be between or equal min and max.

Parameters:
min - value that this expression must be greater than
max - value that this expression must be less than
Returns:
constraint restricting this expression to be between or equal to min and max

notBetween

public CspConstraint notBetween(int min,
                                boolean minExclusive,
                                int max,
                                boolean maxExclusive)
Returns a constraint restricting this expression to not fall within a given range from a min to max value

Parameters:
min - start of values that this expression may not contain
minExclusive - true if start of range does not include minimum value
max - start of values that this expression may not contain
maxExclusive - true if end of range does not include maximum value
Returns:
constraint restricting this expression to not fall within a given range

notBetween

public CspConstraint notBetween(int min,
                                int max)
Returns a constraint restricting this expression to not fall within a given range greater than or equal to a min value up to less than or equal a max value

Parameters:
min - start of values that this expression may not contain
max - start of values that this expression may not contain
Returns:
constraint restricting this expression to not fall within a given range