jopt.csp.variable
Interface CspLongExpr

All Superinterfaces:
CspDoubleCast, CspFloatCast, CspLongCast, CspNumExpr
All Known Subinterfaces:
CspGenericLongExpr, CspLongVariable

public interface CspLongExpr
extends CspLongCast

Interface implemented by long 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
 CspLongExpr add(CspLongCast 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
 CspLongExpr add(long l)
          Returns an expression representing the sum of this expression with a static value
 CspConstraint between(long min, boolean minExclusive, long max, boolean maxExclusive)
          Returns a constraint restricting this expression to be between a min and max.
 CspConstraint between(long min, long 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
 CspLongExpr divide(CspLongCast 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
 CspLongExpr divide(long l)
          Returns an expression representing the quotient of this expression with a static value
 CspConstraint eq(CspGenericLongConstant val)
          Returns constraint restricting this expression to a value
 CspConstraint eq(long val)
          Returns constraint restricting this expression to a value
 CspConstraint geq(CspGenericLongConstant val)
          Returns constraint restricting this expression to values above and including a given minimum
 CspConstraint geq(long val)
          Returns constraint restricting this expression to values above and including a given minimum
 long getMax()
          Returns the maximum value of the expression
 long getMin()
          Returns the minimal value of the expression
 CspConstraint gt(CspGenericLongConstant val)
          Returns constraint restricting this expression to values above a given minimum
 CspConstraint gt(long val)
          Returns constraint restricting this expression to values above a given minimum
 CspConstraint leq(CspGenericLongConstant val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspConstraint leq(long val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspConstraint lt(CspGenericLongConstant val)
          Returns constraint restricting this expression to values below a given maximum
 CspConstraint lt(long 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
 CspLongExpr multiply(CspLongCast 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
 CspLongExpr multiply(long l)
          Returns an expression representing the product of this expression with a static value
 CspConstraint neq(CspGenericLongConstant val)
          Returns constraint restricting this expression to all values not equivalent to supplied value
 CspConstraint neq(long val)
          Returns constraint restricting this expression to all values not equivalent to supplied value
 CspConstraint notBetween(long min, boolean minExclusive, long max, boolean maxExclusive)
          Returns a constraint restricting this expression to not fall within a given range from a min to max value
 CspConstraint notBetween(long min, long 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
 CspLongExpr subtract(CspLongCast 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
 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 long getMin()
Returns the minimal value of the expression

Returns:
long value representing the minimum value this expression can be

getMax

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

Returns:
long value representing the maximum value this expression can be

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 representing this + 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 representing this + 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 representing this + d

add

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

Parameters:
expr - expression to add to this expression
Returns:
expression representing this + 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 representing this + 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 representing this + expr

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 representing this - 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 representing this - 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 representing this - d

subtract

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

Parameters:
expr - expression to subtract from this expression
Returns:
expression representing this - 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 representing this - 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 representing this - expr

multiply

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

Parameters:
l - value to multiply by this expression
Returns:
expression representing this * 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 by this expression
Returns:
expression representing this * 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 by this expression
Returns:
expression representing this * d

multiply

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

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

multiply

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

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

multiply

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

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

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 representing this / 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 representing this / 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 representing this / d

divide

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

Parameters:
expr - expression to divide this expression by
Returns:
expression representing this / 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 representing this / 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 representing this / expr

eq

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

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

lt

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

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

leq

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

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

gt

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

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

geq

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

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

neq

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

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

eq

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

Parameters:
val - generic constrant to constrain this expression to
Returns:
constraint constraining this expression to be equal to val

lt

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

Parameters:
val - generic constrant to constrain this expression to
Returns:
constraint constraining this expression to be less than val

leq

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

Parameters:
val - generic constrant to constrain this expression to
Returns:
constraint constraining this expression to be less than equal to val

gt

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

Parameters:
val - generic constrant to constrain this expression to
Returns:
constraint constraining this expression to be greater than val

geq

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

Parameters:
val - generic constrant to constrain this expression to
Returns:
constraint constraining this expression to be greater than or equal to val

neq

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

Parameters:
val - generic constrant to constrain this expression to
Returns:
constraint constraining this expression to be not equal to val

between

public CspConstraint between(long min,
                             boolean minExclusive,
                             long 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(long min,
                             long 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(long min,
                                boolean minExclusive,
                                long 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(long min,
                                long 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