jopt.csp.variable
Interface CspGenericLongExpr

All Superinterfaces:
CspDoubleCast, CspFloatCast, CspGenericDoubleCast, CspGenericFloatCast, CspGenericLongCast, CspGenericNumExpr, CspLongCast, CspLongExpr, CspNumExpr

public interface CspGenericLongExpr
extends CspGenericLongCast, CspLongExpr

Interface for generic float expressions


Method Summary
 CspGenericLongExpr add(CspGenericLongConstant l)
          Returns an expression representing the sum of this expression with a static generic 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.
 CspGenericLongExpr divide(CspGenericLongConstant l)
          Returns an expression representing the quotient of this expression with a static generic value
 CspConstraint eq(CspGenericLongConstant val)
          Returns a constraint restricting this expression to a value
 CspConstraint geq(CspGenericLongConstant val)
          Returns a constraint restricting this expression to values above and including a given minimum
 CspLongCast getExpression(int offset)
          Returns a numeric expression from the internal array
 long getLargestMax()
          Returns the largest maximal value of all variables in the internal array
 long getLargestMax(int start, int end)
          Returns the largest maximal value of all variables in the internal array within start and end offsets
 long getLargestMin()
          Returns the largest minimal value of all variables in the internal array
 long getLargestMin(int start, int end)
          Returns the largest minimal value of all variables in the internal array within start and end offsets
 long getSmallestMax()
          Returns the smallest maximal value of all variables in the internal array
 long getSmallestMax(int start, int end)
          Returns the smallest maximal value of all variables in the internal array within start and end offsets
 long getSmallestMin()
          Returns the smallest minimal value of all variables in the internal array
 long getSmallestMin(int start, int end)
          Returns the smallest minimal value of all variables in the internal array within start and end offsets
 CspConstraint gt(CspGenericLongConstant val)
          Returns a constraint restricting this expression to values above a given minimum
 CspConstraint leq(CspGenericLongConstant val)
          Returns a constraint restricting this expression to values below and including a given maximum
 CspConstraint lt(CspGenericLongConstant val)
          Returns a constraint restricting this expression to values below a given maximum
 CspGenericLongExpr multiply(CspGenericLongConstant l)
          Returns an expression representing the product of this expression with a static generic value
 CspConstraint neq(CspGenericLongConstant val)
          Returns a 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
 CspGenericLongExpr subtract(CspGenericLongConstant l)
          Returns an expression representing the difference of this expression with a static generic value
 
Methods inherited from interface jopt.csp.variable.CspGenericNumExpr
getExpressionCount, getIndices
 
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.CspLongExpr
add, add, add, add, add, add, divide, divide, divide, divide, divide, divide, eq, geq, getMax, getMin, gt, leq, lt, multiply, multiply, multiply, multiply, multiply, multiply, neq, subtract, subtract, subtract, subtract, subtract, subtract
 

Method Detail

getExpression

public CspLongCast getExpression(int offset)
Returns a numeric expression from the internal array

Parameters:
offset - Offset of expression in internal expression array
Returns:
long expression representing the expression at index offset

getLargestMax

public long getLargestMax()
Returns the largest maximal value of all variables in the internal array

Returns:
long value representing the largest maximum of all the long expressions

getLargestMax

public long getLargestMax(int start,
                          int end)
Returns the largest maximal value of all variables in the internal array within start and end offsets

Parameters:
start - offset of the beginning of the range to calculate over
end - offset of the end of the range to calculate over
Returns:
long value representing the largest maximum of all the long expressions between start and end

getSmallestMax

public long getSmallestMax()
Returns the smallest maximal value of all variables in the internal array

Returns:
long value representing the smallest maximum of all the long expressions

getSmallestMax

public long getSmallestMax(int start,
                           int end)
Returns the smallest maximal value of all variables in the internal array within start and end offsets

Parameters:
start - offset of the beginning of the range to calculate over
end - offset of the end of the range to calculate over
Returns:
long value representing the smallest maximum of all the long expressions between start and end

getLargestMin

public long getLargestMin()
Returns the largest minimal value of all variables in the internal array

Returns:
long value representing the largest minimum of all the long expressions

getLargestMin

public long getLargestMin(int start,
                          int end)
Returns the largest minimal value of all variables in the internal array within start and end offsets

Parameters:
start - offset of the beginning of the range to calculate over
end - offset of the end of the range to calculate over
Returns:
long value representing the largest minimum of all the long expressions between start and end

getSmallestMin

public long getSmallestMin()
Returns the smallest minimal value of all variables in the internal array

Returns:
long value representing the smallest minimum of all the long expressions

getSmallestMin

public long getSmallestMin(int start,
                           int end)
Returns the smallest minimal value of all variables in the internal array within start and end offsets

Parameters:
start - offset of the beginning of the range to calculate over
end - offset of the end of the range to calculate over
Returns:
long value representing the smallest minimum of all the long expressions between start and end

add

public CspGenericLongExpr add(CspGenericLongConstant l)
Returns an expression representing the sum of this expression with a static generic value

Parameters:
l - generic long constant to add to this expression
Returns:
generic long expression representing this+l

subtract

public CspGenericLongExpr subtract(CspGenericLongConstant l)
Returns an expression representing the difference of this expression with a static generic value

Parameters:
l - generic long constant to subtract from this expression
Returns:
generic long expression representing this-l

multiply

public CspGenericLongExpr multiply(CspGenericLongConstant l)
Returns an expression representing the product of this expression with a static generic value

Parameters:
l - generic long constant to multiply by this expression
Returns:
generic long expression representing this*l

divide

public CspGenericLongExpr divide(CspGenericLongConstant l)
Returns an expression representing the quotient of this expression with a static generic value

Parameters:
l - generic long constant to divide this expression by
Returns:
generic long expression representing this/l

eq

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

Specified by:
eq in interface CspLongExpr
Parameters:
val - value to constrain this expression to
Returns:
constraint constraining this to be equal to val

lt

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

Specified by:
lt in interface CspLongExpr
Parameters:
val - value to constrain this expression to
Returns:
constraint constraining this to be less than val

leq

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

Specified by:
leq in interface CspLongExpr
Parameters:
val - value to constrain this expression to
Returns:
constraint constraining this to be less than or equal to val

gt

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

Specified by:
gt in interface CspLongExpr
Parameters:
val - value to constrain this expression to
Returns:
constraint constraining this to be greater than val

geq

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

Specified by:
geq in interface CspLongExpr
Parameters:
val - value to constrain this expression to
Returns:
constraint constraining this to be equal to be greater than val

neq

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

Specified by:
neq in interface CspLongExpr
Parameters:
val - value to constrain this expression to
Returns:
constraint constraining this 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.

Specified by:
between in interface CspLongExpr
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.

Specified by:
between in interface CspLongExpr
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

Specified by:
notBetween in interface CspLongExpr
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

Specified by:
notBetween in interface CspLongExpr
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