jopt.csp.spi.arcalgorithm.variable
Class DoubleExpr

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.variable.VariableChangeBase
      extended byjopt.csp.spi.arcalgorithm.variable.NumExprBase
          extended byjopt.csp.spi.arcalgorithm.variable.DoubleExpr
All Implemented Interfaces:
jopt.csp.variable.CspDoubleCast, jopt.csp.variable.CspDoubleExpr, jopt.csp.variable.CspNumExpr, DoubleCast, NumExpr, TrigExpr, VariableChangeSource
Direct Known Subclasses:
DoubleVariable

public class DoubleExpr
extends NumExprBase
implements jopt.csp.variable.CspDoubleExpr, DoubleCast


Constructor Summary
DoubleExpr(java.lang.String name, jopt.csp.variable.CspGenericDoubleCast aexpr, GenericIndex[] rangeIndices, jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
          Constructor for summation
DoubleExpr(java.lang.String name, DoubleCast aexpr, int operation)
          Constructor for operations such as squaring
DoubleExpr(java.lang.String name, DoubleCast aexpr, int operation, double b)
          Constructor for combining double expression with a constant
DoubleExpr(java.lang.String name, DoubleCast aexpr, int operation, DoubleCast bexpr)
          Constructor for combining double expression with another expression
DoubleExpr(java.lang.String name, double a, int operation, DoubleCast bexpr)
          Constructor for combining double constant with another expression
 
Method Summary
 jopt.csp.variable.CspDoubleExpr add(jopt.csp.variable.CspDoubleCast expr)
          Returns an expression representing the sum of this expression with another expression
 jopt.csp.variable.CspDoubleExpr add(double d)
          Returns an expression representing the sum of this expression with a static value
 jopt.csp.variable.CspConstraint between(double min, boolean minExclusive, double max, boolean maxExclusive)
           
 jopt.csp.variable.CspConstraint between(double min, double max)
           
 jopt.csp.variable.CspDoubleExpr divide(jopt.csp.variable.CspDoubleCast expr)
          Returns an expression representing the quotient of this expression with another expression
 jopt.csp.variable.CspDoubleExpr divide(double d)
          Returns an expression representing the quotient of this expression with a static value
 jopt.csp.variable.CspConstraint eq(jopt.csp.variable.CspGenericDoubleConstant val)
          Returns constraint restricting this expression to a value
 jopt.csp.variable.CspConstraint eq(double val)
          Returns constraint restricting this expression to a value
 jopt.csp.variable.CspConstraint geq(jopt.csp.variable.CspGenericDoubleConstant val)
          Returns constraint restricting this expression to values above and including a given minimum
 jopt.csp.variable.CspConstraint geq(double val)
          Returns constraint restricting this expression to values above and including a given minimum
 DoubleDomain getDoubleDomain()
          Returns domain of this expression
 double getMax()
          Returns maximum value of expression
 double getMin()
          Returns minimal value of expression
 java.lang.Number getNextHigher(java.lang.Number val)
          Returns the next higher value in this variable's domain or current value if none exists
 java.lang.Number getNextLower(java.lang.Number val)
          Returns the next lower value in this variable's domain or current value if none exists
 Node getNode()
          Retrieves node for an expression
 int getNumberType()
          Returns the type of expression: Int, Long, etc.
 java.lang.Number getNumMax()
          Returns maximum value of this variable's domain
 java.lang.Number getNumMin()
          Returns minimum value of this variable's domain
 double getPrecision()
          Returns precision associated with this expression's domain for real numbers
 boolean isInDomain(java.lang.Number n)
          Returns true if value is in domain of this expression
 jopt.csp.variable.CspConstraint leq(jopt.csp.variable.CspGenericDoubleConstant val)
          Returns constraint restricting this expression to values below and including a given maximum
 jopt.csp.variable.CspConstraint leq(double val)
          Returns constraint restricting this expression to values below and including a given maximum
 jopt.csp.variable.CspDoubleExpr multiply(jopt.csp.variable.CspDoubleCast expr)
          Returns an expression representing the product of this expression with another expression
 jopt.csp.variable.CspDoubleExpr multiply(double d)
          Returns an expression representing the product of this expression with a static value
 jopt.csp.variable.CspConstraint notBetween(double min, boolean minExclusive, double max, boolean maxExclusive)
           
 jopt.csp.variable.CspConstraint notBetween(double min, double max)
           
 void setPrecision(double p)
          Sets precision associated with this expression's domain for real numbers
 jopt.csp.variable.CspDoubleExpr subtract(jopt.csp.variable.CspDoubleCast expr)
          Returns an expression representing the difference of this expression with another expression
 jopt.csp.variable.CspDoubleExpr subtract(double d)
          Returns an expression representing the difference of this expression with a static value
 
Methods inherited from class jopt.csp.spi.arcalgorithm.variable.NumExprBase
addVariableChangeListener, between, between, between, between, eq, equals, geq, getBooleanSourceArcs, getDomain, getName, getNodeCollection, gt, hashCode, isBound, leq, lt, neq, notBetween, notBetween, notBetween, notBetween, removeVariableChangeListener, setName, toString, updateGraph
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
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.spi.arcalgorithm.constraint.num.NumExpr
getBooleanSourceArcs, getName, getNodeCollection, isBound, updateGraph
 

Constructor Detail

DoubleExpr

public DoubleExpr(java.lang.String name,
                  DoubleCast aexpr,
                  int operation,
                  DoubleCast bexpr)
Constructor for combining double expression with another expression


DoubleExpr

public DoubleExpr(java.lang.String name,
                  double a,
                  int operation,
                  DoubleCast bexpr)
Constructor for combining double constant with another expression


DoubleExpr

public DoubleExpr(java.lang.String name,
                  DoubleCast aexpr,
                  int operation,
                  double b)
Constructor for combining double expression with a constant

Parameters:
name -
aexpr -
operation -
b -

DoubleExpr

public DoubleExpr(java.lang.String name,
                  DoubleCast aexpr,
                  int operation)
Constructor for operations such as squaring


DoubleExpr

public DoubleExpr(java.lang.String name,
                  jopt.csp.variable.CspGenericDoubleCast aexpr,
                  GenericIndex[] rangeIndices,
                  jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
Constructor for summation

Method Detail

getNode

public Node getNode()
Retrieves node for an expression

Specified by:
getNode in interface NumExpr

getNumberType

public int getNumberType()
Returns the type of expression: Int, Long, etc.

Specified by:
getNumberType in interface NumExpr

getDoubleDomain

public DoubleDomain getDoubleDomain()
Returns domain of this expression

Specified by:
getDoubleDomain in interface DoubleCast

getMin

public double getMin()
Returns minimal value of expression

Specified by:
getMin in interface jopt.csp.variable.CspDoubleExpr

getMax

public double getMax()
Returns maximum value of expression

Specified by:
getMax in interface jopt.csp.variable.CspDoubleExpr

getNumMax

public java.lang.Number getNumMax()
Returns maximum value of this variable's domain

Specified by:
getNumMax in interface NumExpr

getNumMin

public java.lang.Number getNumMin()
Returns minimum value of this variable's domain

Specified by:
getNumMin in interface NumExpr

getNextHigher

public java.lang.Number getNextHigher(java.lang.Number val)
Description copied from interface: NumExpr
Returns the next higher value in this variable's domain or current value if none exists

Specified by:
getNextHigher in interface NumExpr

getNextLower

public java.lang.Number getNextLower(java.lang.Number val)
Description copied from interface: NumExpr
Returns the next lower value in this variable's domain or current value if none exists

Specified by:
getNextLower in interface NumExpr

setPrecision

public void setPrecision(double p)
Description copied from interface: NumExpr
Sets precision associated with this expression's domain for real numbers

Specified by:
setPrecision in interface jopt.csp.variable.CspDoubleExpr

getPrecision

public double getPrecision()
Description copied from interface: NumExpr
Returns precision associated with this expression's domain for real numbers

Specified by:
getPrecision in interface jopt.csp.variable.CspDoubleExpr

isInDomain

public boolean isInDomain(java.lang.Number n)
Description copied from interface: TrigExpr
Returns true if value is in domain of this expression

Specified by:
isInDomain in interface TrigExpr

add

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

Specified by:
add in interface jopt.csp.variable.CspDoubleExpr

add

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

Specified by:
add in interface jopt.csp.variable.CspDoubleExpr

subtract

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

Specified by:
subtract in interface jopt.csp.variable.CspDoubleExpr

subtract

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

Specified by:
subtract in interface jopt.csp.variable.CspDoubleExpr

multiply

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

Specified by:
multiply in interface jopt.csp.variable.CspDoubleExpr

multiply

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

Specified by:
multiply in interface jopt.csp.variable.CspDoubleExpr

divide

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

Specified by:
divide in interface jopt.csp.variable.CspDoubleExpr

divide

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

Specified by:
divide in interface jopt.csp.variable.CspDoubleExpr

eq

public jopt.csp.variable.CspConstraint eq(double val)
Returns constraint restricting this expression to a value

Specified by:
eq in interface jopt.csp.variable.CspDoubleExpr

leq

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

Specified by:
leq in interface jopt.csp.variable.CspDoubleExpr

geq

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

Specified by:
geq in interface jopt.csp.variable.CspDoubleExpr

eq

public jopt.csp.variable.CspConstraint eq(jopt.csp.variable.CspGenericDoubleConstant val)
Returns constraint restricting this expression to a value

Specified by:
eq in interface jopt.csp.variable.CspDoubleExpr

leq

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

Specified by:
leq in interface jopt.csp.variable.CspDoubleExpr

geq

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

Specified by:
geq in interface jopt.csp.variable.CspDoubleExpr

between

public jopt.csp.variable.CspConstraint between(double min,
                                               boolean minExclusive,
                                               double max,
                                               boolean maxExclusive)
Specified by:
between in interface jopt.csp.variable.CspDoubleExpr

between

public jopt.csp.variable.CspConstraint between(double min,
                                               double max)
Specified by:
between in interface jopt.csp.variable.CspDoubleExpr

notBetween

public jopt.csp.variable.CspConstraint notBetween(double min,
                                                  boolean minExclusive,
                                                  double max,
                                                  boolean maxExclusive)
Specified by:
notBetween in interface jopt.csp.variable.CspDoubleExpr

notBetween

public jopt.csp.variable.CspConstraint notBetween(double min,
                                                  double max)
Specified by:
notBetween in interface jopt.csp.variable.CspDoubleExpr