jopt.csp.variable
Interface CspGenericIntExpr

All Superinterfaces:
CspGenericDoubleCast, CspGenericFloatCast, CspGenericLongCast, CspGenericNumExpr, CspIntExpr, CspNumExpr

public interface CspGenericIntExpr
extends CspGenericLongCast, CspIntExpr

Interface for generic integer expressions


Method Summary
 CspGenericDoubleExpr add(CspGenericDoubleConstant d)
          Returns an expression representing the sum of this expression with a static generic value
 CspGenericFloatExpr add(CspGenericFloatConstant f)
          Returns an expression representing the sum of this expression with a static generic value
 CspGenericIntExpr add(CspGenericIntConstant i)
          Returns an expression representing the sum of this expression with a static generic value
 CspGenericIntExpr add(CspGenericIntExpr i)
          Returns an expression representing the sum of this expression with a static generic value
 CspGenericLongExpr add(CspGenericLongConstant l)
          Returns an expression representing the sum of this expression with a static generic 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.
 CspGenericDoubleExpr divide(CspGenericDoubleConstant d)
          Returns an expression representing the quotient of this expression with a static generic value
 CspGenericFloatExpr divide(CspGenericFloatConstant f)
          Returns an expression representing the quotient of this expression with a static generic value
 CspGenericIntExpr divide(CspGenericIntConstant i)
          Returns an expression representing the quotient of this expression with a static generic value
 CspGenericIntExpr divide(CspGenericIntExpr i)
          Returns an expression representing the quotient of this expression with a static generic value
 CspGenericLongExpr divide(CspGenericLongConstant l)
          Returns an expression representing the quotient of this expression with a static generic value
 CspConstraint eq(CspGenericIntConstant val)
          Returns a constraint restricting this expression to a value
 CspConstraint geq(CspGenericIntConstant val)
          Returns a constraint restricting this expression to values above and including a given minimum
 CspIntExpr getExpression(int offset)
          Returns a numeric expression from the internal array
 int getLargestMax()
          Returns the largest maximal value of all variables in the internal array
 int getLargestMax(int start, int end)
          Returns the largest maximal value of all variables in the internal array within start and end offsets
 int getLargestMin()
          Returns the largest minimal value of all variables in the internal array
 int getLargestMin(int start, int end)
          Returns the largest minimal value of all variables in the internal array within start and end offsets
 int getSmallestMax()
          Returns the smallest maximal value of all variables in the internal array
 int getSmallestMax(int start, int end)
          Returns the smallest maximal value of all variables in the internal array within start and end offsets
 int getSmallestMin()
          Returns the smallest minimal value of all variables in the internal array
 int getSmallestMin(int start, int end)
          Returns the smallest minimal value of all variables in the internal array within start and end offsets
 CspConstraint gt(CspGenericIntConstant val)
          Returns a constraint restricting this expression to values above a given minimum
 CspConstraint leq(CspGenericIntConstant val)
          Returns a constraint restricting this expression to values below and including a given maximum
 CspConstraint lt(CspGenericIntConstant val)
          Returns a constraint restricting this expression to values below a given maximum
 CspGenericDoubleExpr multiply(CspGenericDoubleConstant d)
          Returns an expression representing the product of this expression with a static generic value
 CspGenericFloatExpr multiply(CspGenericFloatConstant f)
          Returns an expression representing the product of this expression with a static generic value
 CspGenericIntExpr multiply(CspGenericIntConstant i)
          Returns an expression representing the product of this expression with a static generic value
 CspGenericIntExpr multiply(CspGenericIntExpr i)
          Returns an expression representing the product of this expression with a static generic value
 CspGenericLongExpr multiply(CspGenericLongConstant l)
          Returns an expression representing the product of this expression with a static generic value
 CspConstraint neq(CspGenericIntConstant val)
          Returns a 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
 CspGenericDoubleExpr subtract(CspGenericDoubleConstant d)
          Returns an expression representing the difference of this expression with a static generic value
 CspGenericFloatExpr subtract(CspGenericFloatConstant f)
          Returns an expression representing the difference of this expression with a static generic value
 CspGenericIntExpr subtract(CspGenericIntConstant i)
          Returns an expression representing the difference of this expression with a static generic value
 CspGenericIntExpr subtract(CspGenericIntExpr i)
          Returns an expression representing the difference of this expression with a static generic 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.CspIntExpr
add, add, add, add, add, add, add, add, divide, divide, divide, divide, divide, divide, divide, divide, eq, geq, getMax, getMin, gt, leq, lt, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, neq, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract
 

Method Detail

getExpression

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

Parameters:
offset - Offset of expression in internal expression array
Returns:
int expression referenced to be the index at offset

getLargestMax

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

Returns:
int value of the largest maximum of the variables

getLargestMax

public int 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 cover
end - offset of the end of the range to cover
Returns:
int value of the largest maximum of the variables

getSmallestMax

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

Returns:
int value of the smallest maximum of the variables

getSmallestMax

public int 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 cover
end - offset of the end of the range to cover
Returns:
int value of the smallest maximum of the variables

getLargestMin

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

Returns:
int value of the largest minimum of the variables

getLargestMin

public int 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 cover
end - offset of the end of the range to cover
Returns:
int value of the largest minimum of the variables

getSmallestMin

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

Returns:
int value of the smallest minimum of the variables

getSmallestMin

public int 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 cover
end - offset of the end of the range to cover
Returns:
int value of the smallest minimum of the variables

add

public CspGenericIntExpr add(CspGenericIntConstant i)
Returns an expression representing the sum of this expression with a static generic value

Parameters:
i - generic int constant representing the value to be added to this
Returns:
generic int expression representing this + i

add

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

Parameters:
i - generic int expression representing the value to be added to this
Returns:
generic int expression representing this + i

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 representing the value to be added to this
Returns:
generic long expression representing this + l

add

public CspGenericFloatExpr add(CspGenericFloatConstant f)
Returns an expression representing the sum of this expression with a static generic value

Parameters:
f - generic float constant representing the value to be added to this
Returns:
generic float expression representing this + f

add

public CspGenericDoubleExpr add(CspGenericDoubleConstant d)
Returns an expression representing the sum of this expression with a static generic value

Parameters:
d - generic double constant representing the value to be added to this
Returns:
generic double expression representing this + d

subtract

public CspGenericIntExpr subtract(CspGenericIntConstant i)
Returns an expression representing the difference of this expression with a static generic value

Parameters:
i - generic int constant representing the value to be subtracted from this
Returns:
generic int expression representing this - i

subtract

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

Parameters:
i - generic int expression representing the value to be subtracted from this
Returns:
generic int expression representing this - i

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 representing the value to be subtract from this
Returns:
generic long expression representing this - l

subtract

public CspGenericFloatExpr subtract(CspGenericFloatConstant f)
Returns an expression representing the difference of this expression with a static generic value

Parameters:
f - generic float constant representing the value to be subtracted from this
Returns:
generic float expression representing this - f

subtract

public CspGenericDoubleExpr subtract(CspGenericDoubleConstant d)
Returns an expression representing the difference of this expression with a static generic value

Parameters:
d - generic double constant representing the value to be subtracted from this
Returns:
generic double expression representing this - d

multiply

public CspGenericIntExpr multiply(CspGenericIntConstant i)
Returns an expression representing the product of this expression with a static generic value

Parameters:
i - generic int constant representing the value to be multiplied by this
Returns:
generic int expression representing this * i

multiply

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

Parameters:
i - generic int expression representing the value to be multiplied by this
Returns:
generic int expression representing this * i

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 representing the value to be multiply by this
Returns:
generic long expression representing this * l

multiply

public CspGenericFloatExpr multiply(CspGenericFloatConstant f)
Returns an expression representing the product of this expression with a static generic value

Parameters:
f - generic float constant representing the value to be multiply by this
Returns:
generic float expression representing this * f

multiply

public CspGenericDoubleExpr multiply(CspGenericDoubleConstant d)
Returns an expression representing the product of this expression with a static generic value

Parameters:
d - generic double constant representing the value to be multiply by this
Returns:
generic double expression representing this * d

divide

public CspGenericIntExpr divide(CspGenericIntConstant i)
Returns an expression representing the quotient of this expression with a static generic value

Parameters:
i - generic int constant representing the value to divide this by
Returns:
generic int expression representing this / i

divide

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

Parameters:
i - generic int expression representing the value to divide this by
Returns:
generic int expression representing this / i

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 representing the value to divide this by
Returns:
generic long expression representing this / l

divide

public CspGenericFloatExpr divide(CspGenericFloatConstant f)
Returns an expression representing the quotient of this expression with a static generic value

Parameters:
f - generic float constant representing the value to divid this by
Returns:
generic float expression representing this / f

divide

public CspGenericDoubleExpr divide(CspGenericDoubleConstant d)
Returns an expression representing the quotient of this expression with a static generic value

Parameters:
d - generic double constant representing the value to divide this by
Returns:
generic double expression representing this / d

eq

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

Specified by:
eq in interface CspIntExpr
Parameters:
val - value to constaint this to
Returns:
constraint constraining this to be equal to val

lt

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

Specified by:
lt in interface CspIntExpr
Parameters:
val - value to constaint this to
Returns:
constraint constraining this to be less than val

leq

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

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

gt

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

Specified by:
gt in interface CspIntExpr
Parameters:
val - value to constaint this to
Returns:
constraint constraining this to be greater than val

geq

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

Specified by:
geq in interface CspIntExpr
Parameters:
val - value to constaint this to
Returns:
constraint constraining this to be greater than or equal to val

neq

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

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

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

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

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

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