jopt.csp.variable
Interface CspFloatExpr

All Superinterfaces:
CspDoubleCast, CspFloatCast, CspNumExpr
All Known Subinterfaces:
CspFloatVariable, CspGenericFloatExpr

public interface CspFloatExpr
extends CspFloatCast

Interface implemented by float precision floating point 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(CspFloatCast 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
 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.
 CspDoubleExpr divide(CspDoubleExpr expr)
          Returns an expression representing the quotient of this expression with another expression
 CspFloatExpr divide(CspFloatCast 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
 CspConstraint eq(CspGenericFloatConstant val)
          Returns constraint restricting this expression to a value
 CspConstraint eq(float val)
          Returns constraint restricting this expression to a value
 CspConstraint geq(CspGenericFloatConstant val)
          Returns constraint restricting this expression to values above and including a given minimum
 CspConstraint geq(float val)
          Returns constraint restricting this expression to values above and including a given minimum
 float getMax()
          Returns maximum value of expression
 float getMin()
          Returns minimal value of expression
 double getPrecision()
          Returns precision associated with this expression
 CspConstraint leq(CspGenericFloatConstant val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspConstraint leq(float val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspDoubleExpr multiply(CspDoubleExpr expr)
          Returns an expression representing the product of this expression with another expression
 CspFloatExpr multiply(CspFloatCast 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
 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
 void setPrecision(double p)
          Sets precision associated with this expression
 CspDoubleExpr subtract(CspDoubleExpr expr)
          Returns an expression representing the difference of this expression with another expression
 CspFloatExpr subtract(CspFloatCast 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
 
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 float getMin()
Returns minimal value of expression

Returns:
minimum of this expression's domain

getMax

public float getMax()
Returns maximum value of expression

Returns:
maximum of this expression's domain

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
Returns:
CspFloatExpr representing this+f

add

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

Parameters:
d - double value to add to this
Returns:
CspDoubleExpr representing this+d

add

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

Parameters:
expr - expression to add to this
Returns:
CspFloatExpr representing this+expr

add

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

Parameters:
expr - double expression to add to this
Returns:
CspDoubleExpr representing this+expr

subtract

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

Parameters:
f - float to subract from this
Returns:
CspFloatExpr representing this - f

subtract

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

Parameters:
d - double to subract from this
Returns:
CspDoubleExpr representing this - d

subtract

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

Parameters:
expr - float expression to subract from this
Returns:
CspFloatExpr representing this - expr

subtract

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

Parameters:
expr - double expression to subract from this
Returns:
CspDoubleExpr representing this - expr

multiply

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

Parameters:
f - float to multiply by this
Returns:
CspFloatExpr representing this * f

multiply

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

Parameters:
d - double to multiply by this
Returns:
CspDoubleExpr representing this * d

multiply

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

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

multiply

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

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

divide

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

Parameters:
f - float value to divide by this
Returns:
CspFloatExpr representing this / f

divide

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

Parameters:
d - double to divide by this
Returns:
CspDoubleExpr representing this / d

divide

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

Parameters:
expr - float expression to divide by this
Returns:
CspFloatExpr representing this / expr

divide

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

Parameters:
expr - double expression to divide by this
Returns:
CspDoubleExpr representing this / expr

eq

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

Parameters:
val - float to constrain the domain to
Returns:
CspConstraint constraining this to val

leq

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

Parameters:
val - 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(float val)
Returns constraint restricting this expression to values above and including a given minimum

Parameters:
val - float to constrain the domain to be greater than or equal to
Returns:
CspConstraint constraining this to be greater than or equal to val

eq

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

Parameters:
val - generic float to constrain the domain to
Returns:
CspConstraint constraining this to val

leq

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

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 constraint restricting this expression to values above and including a given minimum

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.

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.

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

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

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

setPrecision

public void setPrecision(double p)
Sets precision associated with this expression

Parameters:
p - double representing the precision associated with this expression

getPrecision

public double getPrecision()
Returns precision associated with this expression

Returns:
precision associated with this expression