jopt.csp.variable
Interface CspGenericDoubleExpr

All Superinterfaces:
CspDoubleCast, CspDoubleExpr, CspGenericDoubleCast, CspGenericNumExpr, CspNumExpr

public interface CspGenericDoubleExpr
extends CspGenericDoubleCast, CspDoubleExpr

Interface for generic double expressions


Method Summary
 CspGenericDoubleExpr add(CspGenericDoubleConstant d)
          Returns an expression representing the sum of this expression with a static generic 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.
 CspGenericDoubleExpr divide(CspGenericDoubleConstant d)
          Returns an expression representing the quotient of this expression with a static generic value
 CspConstraint eq(CspGenericDoubleConstant val)
          Returns a constraint restricting this expression to a value
 CspConstraint geq(CspGenericDoubleConstant val)
          Returns a constraint restricting this expression to values above and including a given minimum
 CspDoubleExpr getExpression(int offset)
          Returns a numeric expression from the internal array
 double getLargestMax()
          Returns the largest maximal value of all variables in the internal array
 double getLargestMax(int start, int end)
          Returns the largest maximal value of all variables in the internal array within start and end offsets
 double getLargestMin()
          Returns the largest minimal value of all variables in the internal array
 double getLargestMin(int start, int end)
          Returns the largest minimal value of all variables in the internal array within start and end offsets
 double getSmallestMax()
          Returns the smallest maximal value of all variables in the internal array
 double getSmallestMax(int start, int end)
          Returns the smallest maximal value of all variables in the internal array within start and end offsets
 double getSmallestMin()
          Returns the smallest minimal value of all variables in the internal array
 double getSmallestMin(int start, int end)
          Returns the smallest minimal value of all variables in the internal array within start and end indices
 CspConstraint leq(CspGenericDoubleConstant 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
 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
 CspGenericDoubleExpr subtract(CspGenericDoubleConstant d)
          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.CspDoubleExpr
add, add, divide, divide, eq, geq, getMax, getMin, getPrecision, leq, multiply, multiply, setPrecision, subtract, subtract
 

Method Detail

getExpression

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

Parameters:
offset - Offset of expression in internal expression array
Returns:
double expression indexed at offset

getLargestMax

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

Returns:
double value of the largest maximum

getLargestMax

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

Parameters:
start - index for the beginning of the range
end - index for the end of the range
Returns:
double value of the largest maximum in range

getSmallestMax

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

Returns:
double value of the smallest maximum

getSmallestMax

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

Parameters:
start - index for the beginning of the range
end - index for the end of the range
Returns:
double value of the smallest maximum in range

getLargestMin

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

Returns:
double value of the largest minimum in range

getLargestMin

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

Parameters:
start - index for the beginning of the range
end - index for the end of the range
Returns:
double value of the largest minimum in range

getSmallestMin

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

Returns:
double value of the smallest minimum in range

getSmallestMin

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

Parameters:
start - index for the beginning of the range
end - index for the end of the range
Returns:
double value of the largest minimum in range

add

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

Parameters:
d - generic constant to add to each value
Returns:
a generic double expression represening this+d

subtract

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

Parameters:
d - generic constant to subtract from each value
Returns:
a generic double expression represening this-d

multiply

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

Parameters:
d - generic constant to multiply each value by
Returns:
a generic double expression represening this*d

divide

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

Parameters:
d - generic constant to divide each value by
Returns:
a generic double expression represening this/d

eq

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

Specified by:
eq in interface CspDoubleExpr
Parameters:
val - val to constraint this to
Returns:
constraint representing this = val

leq

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

Specified by:
leq in interface CspDoubleExpr
Parameters:
val - val to constraint this to
Returns:
constraint representing this <= val

geq

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

Specified by:
geq in interface CspDoubleExpr
Parameters:
val - val to constraint this to
Returns:
constraint representing this >= 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.

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

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

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

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