jopt.csp.variable
Interface CspDoubleExpr

All Superinterfaces:
CspDoubleCast, CspNumExpr
All Known Subinterfaces:
CspDoubleVariable, CspGenericDoubleExpr

public interface CspDoubleExpr
extends CspDoubleCast

Interface implemented by double precision floating point numeric expressions. The domain of this type of object is computed and direct changes to it will have no effect.


Method Summary
 CspDoubleExpr add(CspDoubleCast 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
 CspConstraint between(double min, boolean minExclusive, double max, boolean maxExclusive)
          Returns a constraint restricting this expression to be between a min and max.
 CspConstraint between(double min, double max)
          Returns a constraint restricting this expression to be between or equal min and max.
 CspDoubleExpr divide(CspDoubleCast 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
 CspConstraint eq(CspGenericDoubleConstant val)
          Returns constraint restricting this expression to a value
 CspConstraint eq(double val)
          Returns constraint restricting this expression to a value
 CspConstraint geq(CspGenericDoubleConstant val)
          Returns constraint restricting this expression to values above and including a given minimum
 CspConstraint geq(double val)
          Returns constraint restricting this expression to values above and including a given minimum
 double getMax()
          Returns maximum value of expression
 double getMin()
          Returns minimal value of expression
 double getPrecision()
          Returns precision associated with this expression
 CspConstraint leq(CspGenericDoubleConstant val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspConstraint leq(double val)
          Returns constraint restricting this expression to values below and including a given maximum
 CspDoubleExpr multiply(CspDoubleCast 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
 CspConstraint notBetween(double min, boolean minExclusive, double max, boolean maxExclusive)
          Returns a constraint restricting this expression to not fall within a given range from a min to max value
 CspConstraint notBetween(double min, double 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(CspDoubleCast 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
 
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 double getMin()
Returns minimal value of expression

Returns:
minimal value of expression

getMax

public double getMax()
Returns maximum value of expression

Returns:
maximim value of expressioni

add

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

Parameters:
d - value added to this for creation of
Returns:
CspDoubleExpr representing this + d

add

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

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

subtract

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

Parameters:
d - double value to be subtracted from this
Returns:
double representing this - d

subtract

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

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

multiply

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

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

multiply

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

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

divide

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

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

divide

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

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

eq

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

Parameters:
val - value to constrain this expression to
Returns:
CspConstraint constraining this to val

leq

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

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

geq

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

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

eq

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

Parameters:
val - generic constants to constrain this expression to
Returns:
CspConstraint constraining this to val

leq

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

Parameters:
val - generic constants to constrain this expression to less than or equal to
Returns:
CspConstraint constraining this to be less than or equal to val

geq

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

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

between

public CspConstraint between(double min,
                             boolean minExclusive,
                             double 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(double min,
                             double 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(double min,
                                boolean minExclusive,
                                double 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(double min,
                                double 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 level of precision to associate with this expression

getPrecision

public double getPrecision()
Returns precision associated with this expression

Returns:
precision associated with this expression