jopt.csp.variable
Interface CspGenericFloatExpr

All Superinterfaces:
CspDoubleCast, CspFloatCast, CspFloatExpr, CspGenericDoubleCast, CspGenericFloatCast, CspGenericNumExpr, CspNumExpr

public interface CspGenericFloatExpr
extends CspGenericFloatCast, CspFloatExpr

Interface for generic float 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
 CspConstraint between(float min, boolean minExclusive, float max, boolean maxExclusive)
          Returns a constraint restricting this expression to be between a min and max.
 CspConstraint between(float min, float 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
 CspConstraint eq(CspGenericFloatConstant val)
          Returns a constraint restricting this expression to a value
 CspConstraint geq(CspGenericFloatConstant val)
          Returns a constraint restricting this expression to values above and including a given minimum
 CspFloatCast getExpression(int offset)
          Returns a numeric expression from the internal array
 float getLargestMax()
          Returns the largest maximal value of all variables in the internal array
 float getLargestMax(int start, int end)
          Returns the largest maximal value of all variables in the internal array within start and end offsets
 float getLargestMin()
          Returns the largest minimal value of all variables in the internal array
 float getLargestMin(int start, int end)
          Returns the largest minimal value of all variables in the internal array within start and end offsets
 float getSmallestMax()
          Returns the smallest maximal value of all variables in the internal array
 float getSmallestMax(int start, int end)
          Returns the smallest maximal value of all variables in the internal array within start and end offsets
 float getSmallestMin()
          Returns the smallest minimal value of all variables in the internal array
 float getSmallestMin(int start, int end)
          Returns the smallest minimal value of all variables in the internal array within start and end offsets
 CspConstraint leq(CspGenericFloatConstant val)
          Returns a constraint restricting this expression to values below and including 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
 CspConstraint notBetween(float min, boolean minExclusive, float max, boolean maxExclusive)
          Returns a constraint restricting this expression to not fall within a given range from a min to max value
 CspConstraint notBetween(float min, float 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
 
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.CspFloatExpr
add, add, add, add, divide, divide, divide, divide, eq, geq, getMax, getMin, getPrecision, leq, multiply, multiply, multiply, multiply, setPrecision, subtract, subtract, subtract, subtract
 

Method Detail

getExpression

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

Parameters:
offset - Offset of expression in internal expression array
Returns:
float expression indexed at the specified offset

getLargestMax

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

Returns:
float value of the largest maximum value of all wrapped float expressions

getLargestMax

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

Returns:
float value of the largest maximum value of all wrapped float expressions

getSmallestMax

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

Returns:
float value of the smallest maximum value of all wrapped float expressions

getSmallestMax

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

Returns:
float value of the smallest maximum value of all wrapped float expressions

getLargestMin

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

Returns:
float value of the largest minimum value of all wrapped float expressions

getLargestMin

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

Returns:
float value of the largest minimum value of all wrapped float expressions

getSmallestMin

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

Returns:
float value of the smallest minimum value of all wrapped float expressions

getSmallestMin

public float 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
Returns:
float value of the smallest minimum value of all wrapped float expressions

add

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

Parameters:
f - generic constant float to add to this expression
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 constant double to add to this expression
Returns:
generic double expression representing this + d

subtract

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

Parameters:
f - generic constant float to subtract from this expression
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 constant double to subtract from this expression
Returns:
generic double expression representing this - d

multiply

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

Parameters:
f - generic constant float to multiply by this expression
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 constant double to multiply by this expression
Returns:
generic double expression representing this * d

divide

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

Parameters:
f - generic constant float to divide this expression 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 constant double to divide this expression by
Returns:
generic double expression representing this / d

eq

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

Specified by:
eq in interface CspFloatExpr
Parameters:
val - generic float to constrain the domain to
Returns:
CspConstraint constraining this to val

leq

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

Specified by:
leq in interface CspFloatExpr
Parameters:
val - generic float to constrain the domain to be less than or equal to
Returns:
CspConstraint constraining this to be less than or equal to val

geq

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

Specified by:
geq in interface CspFloatExpr
Parameters:
val - generic float to constrain the domain to be greater than or equal to
Returns:
CspConstraint constraining this to be greater than or equal to val

between

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

Specified by:
between in interface CspFloatExpr
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(float min,
                             float max)
Returns a constraint restricting this expression to be between or equal min and max.

Specified by:
between in interface CspFloatExpr
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(float min,
                                boolean minExclusive,
                                float 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 CspFloatExpr
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(float min,
                                float 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 CspFloatExpr
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