Class HxModel
- java.lang.Object
-
- com.hexaly.optimizer.HxModel
-
public class HxModel extends java.lang.ObjectMathematical optimization model. A model is composed of expressions (some of which are decisions), organized as a tree. Then, some expressions of the model can be constrained or optimized. Once your optimization model is created and closed, the optimizer can be launched to resolve it. Note that you cannot modify a model which has been closed: you must reopen it (withopen()) or instantiate another Hexaly Optimizer environment to optimize another model.- See Also:
HxExpression,HxOperator
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HxExpressionabs(HxExpression a)Creates an absolute value expression.voidaddConstraint(HxExpression expr)Adds the given expression to the list of constraints.voidaddObjective(HxExpression expr, HxObjectiveDirection direction)Adds the given expression to the list of objectives to optimize.HxExpressionand()Creates an AND expression.HxExpressionand(HxExpression a)Creates an AND expression.HxExpressionand(HxExpression... operands)Creates an AND expression.HxExpressionand(HxExpression a, HxExpression b)Creates an AND expression.HxExpressionand(java.lang.Iterable<HxExpression> operands)Creates an AND expression.HxExpressionarray()Creates an array expression.HxExpressionarray(double... operands)Creates an array expression.HxExpressionarray(float... operands)Creates an array expression.HxExpressionarray(int... operands)Creates an array expression.HxExpressionarray(long... operands)Creates an array expression.HxExpressionarray(HxExpression... operands)Creates an array expression.HxExpressionarray(HxExpression range, HxExpression lambda, double defaultvalue)Creates an array expression.HxExpressionarray(HxExpression range, HxExpression lambda, long defaultvalue)Creates an array expression.HxExpressionarray(java.lang.Object operands)Creates an N-dimensional array expression.HxExpressionat(HxExpression array, long index)Creates a "at" expression.HxExpressionat(HxExpression array, HxExpression... indices)Creates a "at" expression for N-dimensional array.HxExpressionboolVar()Creates a boolean decision.HxExpressioncall()Creates a call expression.HxExpressioncall(HxExpression a)Creates a call expression.HxExpressioncall(HxExpression... operands)Creates a call expression.HxExpressioncall(HxExpression a, HxExpression b)Creates a call expression.HxExpressioncall(HxExpression a, HxExpression b, HxExpression c)Creates a call expression.HxExpressioncall(java.lang.Iterable<HxExpression> operands)Creates a call expression.HxExpressionceil(HxExpression a)Creates a ceil expression.voidclose()Closes the model.HxExpressionconstArray(double[] values)Creates a constant array expression.HxExpressionconstArray(long[] values)Creates a constant array expression.voidconstraint(HxExpression expr)Shortcut for addConstraint(expr).HxExpressioncontains(HxExpression a, long b)Creates a contains expression.HxExpressioncontains(HxExpression a, HxExpression b)Creates a contains expression.HxExpressioncos(HxExpression a)Creates a cosine expression.HxExpressioncount(HxExpression a)Creates a count expression.HxExpressioncover()Creates a cover expression.HxExpressioncover(HxExpression array)Creates a cover expression.HxExpressioncover(HxExpression... operands)Creates a cover expression.HxExpressioncover(java.lang.Iterable<HxExpression> operands)Creates a cover expression.HxExpressioncreateConstant(double value)Creates a constant expression representing the given value.HxExpressioncreateConstant(long value)Creates a constant expression representing the given value.HxExpressioncreateConstArray(double[] values)Creates a constant array expression representing the given array.HxExpressioncreateConstArray(long[] values)Creates a constant array expression representing the given array.HxExpressioncreateDoubleArrayExternalFunction(HxDoubleArrayExternalFunction func)Creates a double array external function.HxExpressioncreateDoubleExternalFunction(HxDoubleExternalFunction func)Creates a double external function.HxExpressioncreateExpression(HxOperator op)Creates an expression of the given type.HxExpressioncreateExpression(HxOperator op, double expr0)Creates an expression of the given type, with the given operand.HxExpressioncreateExpression(HxOperator op, double[] operands)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, double expr0, double expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, double expr0, double expr1, double expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, double expr0, double expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, double expr0, HxExpression expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, double expr0, HxExpression expr1, double expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, double expr0, HxExpression expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, float[] operands)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, int[] operands)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0)Creates an expression of the given type, with the given operand.HxExpressioncreateExpression(HxOperator op, long[] operands)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0, long expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0, long expr1, long expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0, long expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0, HxExpression expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0, HxExpression expr1, long expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, long expr0, HxExpression expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0)Creates an expression of the given type, with the given operand.HxExpressioncreateExpression(HxOperator op, HxExpression... operands)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, double expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, double expr1, double expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, double expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, long expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, long expr1, long expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, long expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, HxExpression expr1)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, HxExpression expr1, double expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, HxExpression expr1, long expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, HxExpression expr0, HxExpression expr1, HxExpression expr2)Creates an expression of the given type, with the given operands.HxExpressioncreateExpression(HxOperator op, java.lang.Iterable<HxExpression> operands)Creates an expression of the given type, with the given operands.HxExpressioncreateIntArrayExternalFunction(HxIntArrayExternalFunction func)Creates an integer array external function.HxExpressioncreateIntExternalFunction(HxIntExternalFunction func)Creates an integer external function.HxExpressioncreateLambdaFunction(int nbArgs, HxLambdaFunction functor)Creates a lambda function with arguments.HxExpressioncreateLambdaFunction(HxLambdaFunction0 functor)Creates a lambda function without arguments.HxExpressioncreateLambdaFunction(HxLambdaFunction1 functor)Creates a lambda function with one arguments.HxExpressioncreateLambdaFunction(HxLambdaFunction2 functor)Creates a lambda function with two arguments.HxExpressioncreateLambdaFunction(HxLambdaFunction3 functor)Creates a lambda function with three arguments.HxExpressiondisjoint()Creates a disjoint expression.HxExpressiondisjoint(HxExpression array)Creates a disjoint expression.HxExpressiondisjoint(HxExpression... operands)Creates a disjoint expression.HxExpressiondisjoint(java.lang.Iterable<HxExpression> operands)Creates a disjoint expression.HxExpressiondist(double a, HxExpression b)Creates a distance expression.HxExpressiondist(long a, HxExpression b)Creates a distance expression.HxExpressiondist(HxExpression a, double b)Creates a distance expression.HxExpressiondist(HxExpression a, long b)Creates a distance expression.HxExpressiondist(HxExpression a, HxExpression b)Creates a distance expression.HxExpressiondistinct(HxExpression a)Creates an distinct expression.HxExpressiondistinct(HxExpression a, HxExpression b)Creates an distinct expression.HxExpressiondiv(double a, HxExpression b)Creates a division expression.HxExpressiondiv(long a, HxExpression b)Creates a division expression.HxExpressiondiv(HxExpression a, double b)Creates a division expression.HxExpressiondiv(HxExpression a, long b)Creates a division expression.HxExpressiondiv(HxExpression a, HxExpression b)Creates a division expression.HxExpressiondoubleArrayExternalFunction(HxDoubleArrayExternalFunction func)Creates an external function expression.HxExpressiondoubleExternalFunction(HxDoubleExternalFunction func)Creates an external function expression.HxExpressionend(HxExpression a)Creates an end expression.HxExpressioneq(double a, HxExpression b)Creates an equality expression.HxExpressioneq(long a, HxExpression b)Creates an equality expression.HxExpressioneq(HxExpression a, double b)Creates an equality expression.HxExpressioneq(HxExpression a, long b)Creates an equality expression.HxExpressioneq(HxExpression a, HxExpression b)Creates an equality expression.booleanequals(java.lang.Object obj)HxExpressionexp(HxExpression a)Creates an exponential expression.HxExpressionfind(HxExpression a, long b)Creates a find expression.HxExpressionfind(HxExpression a, HxExpression b)Creates a find expression.HxExpressionfloatVar(double lb, double ub)Creates a float decision.HxExpressionfloor(HxExpression a)Creates a floor expression.HxExpressiongeq(double a, HxExpression b)Creates an inequality expression greater than or equal to.HxExpressiongeq(long a, HxExpression b)Creates an inequality expression greater than or equal to.HxExpressiongeq(HxExpression a, double b)Creates an inequality expression greater than or equal to.HxExpressiongeq(HxExpression a, long b)Creates an inequality expression greater than or equal to.HxExpressiongeq(HxExpression a, HxExpression b)Creates an inequality expression greater than or equal to.HxExpressiongetConstraint(int constraintIndex)Gets the constraint with the given index.HxExpressiongetDecision(int decisionIndex)Gets the decision with the given index.HxExpressiongetExpression(int exprIndex)Gets the expression with the given index in this model.HxExpressiongetExpression(java.lang.String name)Gets the expression with the given index in this model.intgetNbConstraints()Gets the number of constraints added to this model.intgetNbDecisions()Gets the number of decisions in the model.intgetNbExpressions()Gets the number of expressions added to this model.intgetNbObjectives()Gets the number of objectives added to this model.intgetNbOperands()Gets the number of operands in the model.HxExpressiongetObjective(int objectiveIndex)Gets the objective with the given index.HxObjectiveDirectiongetObjectiveDirection(int objectiveIndex)Gets the direction of the objective with the given index.HexalyOptimizergetOptimizer()Returns the Hexaly Optimizer object associated to this model.HxExpressiongt(double a, HxExpression b)Creates an inequality expression greater than.HxExpressiongt(long a, HxExpression b)Creates an inequality expression greater than.HxExpressiongt(HxExpression a, double b)Creates an inequality expression greater than.HxExpressiongt(HxExpression a, long b)Creates an inequality expression greater than.HxExpressiongt(HxExpression a, HxExpression b)Creates an inequality expression greater than.inthashCode()HxExpressionhull()Creates a hull expression.HxExpressionhull(HxExpression array)Creates a hull expression.HxExpressionhull(HxExpression... operands)Creates a hull expression.HxExpressioniif(HxExpression a, double b, double c)Creates a ternary conditional expression.HxExpressioniif(HxExpression a, double b, HxExpression c)Creates a ternary conditional expression.HxExpressioniif(HxExpression a, long b, long c)Creates a ternary conditional expression.HxExpressioniif(HxExpression a, long b, HxExpression c)Creates a ternary conditional expression.HxExpressioniif(HxExpression a, HxExpression b, double c)Creates a ternary conditional expression.HxExpressioniif(HxExpression a, HxExpression b, long c)Creates a ternary conditional expression.HxExpressioniif(HxExpression a, HxExpression b, HxExpression c)Creates a ternary conditional expression.HxExpressionindexOf(HxExpression a, long b)Creates an indexOf expression.HxExpressionindexOf(HxExpression a, HxExpression b)Creates an indexOf expression.HxExpressionintArrayExternalFunction(HxIntArrayExternalFunction func)Creates an external function expression.HxExpressionintersection(HxExpression... operands)Creates an intersection expression of n intervals.HxExpressionintersection(HxExpression a, HxExpression b)Creates an intersection expression.HxExpressionintervalVar(long minStart, long maxEnd)Creates an interval decision included in [minStart, maxEnd).HxExpressionintExternalFunction(HxIntExternalFunction func)Creates an external function expression.HxExpressionintVar(long lb, long ub)Creates an integer decision.booleanisClosed()Returns true if the model is closed, false otherwise.HxExpressionlambdaFunction(int nbArgs, HxLambdaFunction functor)Creates a lambda function expression.HxExpressionlambdaFunction(HxLambdaFunction0 functor)Creates a lambda function expression.HxExpressionlambdaFunction(HxLambdaFunction1 functor)Creates a lambda function expression.HxExpressionlambdaFunction(HxLambdaFunction2 functor)Creates a lambda function expression.HxExpressionlambdaFunction(HxLambdaFunction3 functor)Creates a lambda function expression.HxExpressionlength(HxExpression a)Creates a length expression.HxExpressionleq(double a, HxExpression b)Creates an inequality expression less than or equal to.HxExpressionleq(long a, HxExpression b)Creates an inequality expression less than or equal to.HxExpressionleq(HxExpression a, double b)Creates an inequality expression less than or equal to.HxExpressionleq(HxExpression a, long b)Creates an inequality expression less than or equal to.HxExpressionleq(HxExpression a, HxExpression b)Creates an inequality expression less than or equal to.HxExpressionlistVar(long n)Creates a list decision with the given length.HxExpressionlog(HxExpression a)Creates a log expression.HxExpressionlt(double a, HxExpression b)Creates an inequality expression less than.HxExpressionlt(long a, HxExpression b)Creates an inequality expression less than.HxExpressionlt(HxExpression a, double b)Creates an inequality expression less than.HxExpressionlt(HxExpression a, long b)Creates an inequality expression less than.HxExpressionlt(HxExpression a, HxExpression b)Creates an inequality expression less than.HxExpressionmax()Creates a maximum expression.HxExpressionmax(double a)Creates a maximum expression.HxExpressionmax(double a, HxExpression b)Creates a maximum expression.HxExpressionmax(long a)Creates a maximum expression.HxExpressionmax(long a, HxExpression b)Creates a maximum expression.HxExpressionmax(HxExpression a)Creates a maximum expression.HxExpressionmax(HxExpression... operands)Creates a maximum expression.HxExpressionmax(HxExpression a, double b)Creates a maximum expression.HxExpressionmax(HxExpression a, long b)Creates a maximum expression.HxExpressionmax(HxExpression a, HxExpression b)Creates a maximum expression.HxExpressionmax(java.lang.Iterable<HxExpression> operands)Creates a maximum expression.voidmaximize(HxExpression expr)Shortcut for addObjective(expr, OD_Maximize).HxExpressionmin()Creates a minimum expression.HxExpressionmin(double a)Creates a minimum expression.HxExpressionmin(double a, HxExpression b)Creates a minimum expression.HxExpressionmin(long a)Creates a minimum expression.HxExpressionmin(long a, HxExpression b)Creates a minimum expression.HxExpressionmin(HxExpression a)Creates a minimum expression.HxExpressionmin(HxExpression... operands)Creates a minimum expression.HxExpressionmin(HxExpression a, double b)Creates a minimum expression.HxExpressionmin(HxExpression a, long b)Creates a minimum expression.HxExpressionmin(HxExpression a, HxExpression b)Creates a minimum expression.HxExpressionmin(java.lang.Iterable<HxExpression> operands)Creates a minimum expression.voidminimize(HxExpression expr)Shortcut for addObjective(expr, OD_Minimize).HxExpressionmod(long a, HxExpression b)Creates a modulo expression.HxExpressionmod(HxExpression a, long b)Creates a modulo expression.HxExpressionmod(HxExpression a, HxExpression b)Creates a modulo expression.HxExpressionneq(double a, HxExpression b)Creates a disequality expression.HxExpressionneq(long a, HxExpression b)Creates a disequality expression.HxExpressionneq(HxExpression a, double b)Creates a disequality expression.HxExpressionneq(HxExpression a, long b)Creates a disequality expression.HxExpressionneq(HxExpression a, HxExpression b)Creates a disequality expression.HxExpressionnot(HxExpression a)Creates a NOT expression.voidopen()Reopens the model.HxExpressionor()Creates a OR expression.HxExpressionor(HxExpression a)Creates a OR expression.HxExpressionor(HxExpression... operands)Creates a OR expression.HxExpressionor(HxExpression a, HxExpression b)Creates a OR expression.HxExpressionor(java.lang.Iterable<HxExpression> operands)Creates a OR expression.HxExpressionpartition()Creates a partition expression.HxExpressionpartition(HxExpression array)Creates a partition expression.HxExpressionpartition(HxExpression... operands)Creates a partition expression.HxExpressionpartition(java.lang.Iterable<HxExpression> operands)Creates a partition expression.HxExpressionpiecewise(HxExpression abscissae, HxExpression ordinates, HxExpression x)Creates a piecewise linear expression.HxExpressionpow(double a, HxExpression b)Creates a power expression.HxExpressionpow(long a, HxExpression b)Creates a power expression.HxExpressionpow(HxExpression a, double b)Creates a power expression.HxExpressionpow(HxExpression a, long b)Creates a power expression.HxExpressionpow(HxExpression a, HxExpression b)Creates a power expression.HxExpressionprod()Creates a product expression.HxExpressionprod(double a)Creates a product expression.HxExpressionprod(double a, HxExpression b)Creates a product expression.HxExpressionprod(long a)Creates a product expression.HxExpressionprod(long a, HxExpression b)Creates a product expression.HxExpressionprod(HxExpression a)Creates a product expression.HxExpressionprod(HxExpression... operands)Creates a product expression.HxExpressionprod(HxExpression a, double b)Creates a product expression.HxExpressionprod(HxExpression a, long b)Creates a product expression.HxExpressionprod(HxExpression a, HxExpression b)Creates a product expression.HxExpressionprod(java.lang.Iterable<HxExpression> operands)Creates a product expression.HxExpressionrange(long a, long b)Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive).HxExpressionrange(long a, HxExpression b)Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive).HxExpressionrange(HxExpression a, long b)Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive).HxExpressionrange(HxExpression a, HxExpression b)Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive).voidremoveConstraint(int constraintIndex)Removes the constraint at the given position in the list of constraints.voidremoveConstraint(HxExpression expr)Removes the given expression from the list of constraints.voidremoveObjective(int objectiveIndex)Removes the objective at the given position in the list of objectives.HxExpressionround(HxExpression a)Creates a rounding expression.HxExpressionscalar(HxExpression a, HxExpression b)Creates an expression for the scalar product between two arrays.HxExpressionsetVar(long n)Creates a set decision with the given length.HxExpressionsin(HxExpression a)Creates a sine expression.HxExpressionsort(HxExpression array)Creates a sorted array, containing the same values as the array given as unique parameter, sorted in ascending order.HxExpressionsort(HxExpression array, HxExpression lambda)Creates a sorted array, containing the same values as the array given as first parameter, sorted in ascending order based on the values returned by the the lambda function given as second parameter.HxExpressionsqrt(HxExpression a)Creates a square root expression.HxExpressionstart(HxExpression a)Creates a start expression.HxExpressionstepArray(HxExpression array_1, HxExpression array_2)Creates a stepArray expression.HxExpressionsub(double a, HxExpression b)Creates a substraction expression.HxExpressionsub(long a, HxExpression b)Creates a substraction expression.HxExpressionsub(HxExpression a, double b)Creates a substraction expression.HxExpressionsub(HxExpression a, long b)Creates a substraction expression.HxExpressionsub(HxExpression a, HxExpression b)Creates a substraction expression.HxExpressionsum()Creates a sum expression.HxExpressionsum(double a)Creates a sum expression.HxExpressionsum(double a, HxExpression b)Creates a sum expression.HxExpressionsum(long a)Creates a sum expression.HxExpressionsum(long a, HxExpression b)Creates a sum expression.HxExpressionsum(HxExpression a)Creates a sum expression.HxExpressionsum(HxExpression... operands)Creates a sum expression.HxExpressionsum(HxExpression a, double b)Creates a sum expression.HxExpressionsum(HxExpression a, long b)Creates a sum expression.HxExpressionsum(HxExpression a, HxExpression b)Creates a sum expression.HxExpressionsum(java.lang.Iterable<HxExpression> operands)Creates a sum expression.HxExpressiontan(HxExpression a)Creates a tangent expression.java.lang.StringtoString()Returns a String representation of this model.HxExpressionunion(HxExpression... operands)Creates an union expression of n iterables.HxExpressionxor()Creates a XOR expression.HxExpressionxor(HxExpression a)Creates a XOR expression.HxExpressionxor(HxExpression... operands)Creates a XOR expression.HxExpressionxor(HxExpression a, HxExpression b)Creates a XOR expression.HxExpressionxor(java.lang.Iterable<HxExpression> operands)Creates a XOR expression.
-
-
-
Method Detail
-
getOptimizer
public HexalyOptimizer getOptimizer()
Returns the Hexaly Optimizer object associated to this model.- Returns:
- Hexaly Optimizer object.
-
createConstant
public HxExpression createConstant(long value)
Creates a constant expression representing the given value. Only allowed in stateHxState.Modeling. Note that if a constant has been already created with the same value, this method can return the same expression, but it is not guaranteed. The exact behavior is implementation defined.- Parameters:
value- Value of the constant.- Returns:
- Created constant expression.
-
createConstant
public HxExpression createConstant(double value)
Creates a constant expression representing the given value. Only allowed in stateHxState.Modeling. Note that if a constant has been already created with the same value, this method can return the same expression, but it is not guaranteed. The exact behavior is implementation defined.- Parameters:
value- Value of the constant.- Returns:
- Created constant expression.
-
createConstArray
public HxExpression createConstArray(long[] values)
Creates a constant array expression representing the given array. Note that the constant array created does not have any operands. Only allowed in stateHxState.Modeling.- Parameters:
values- array of constant values.- Returns:
- Created constant array expression.
- Since:
- 13.5
-
createConstArray
public HxExpression createConstArray(double[] values)
Creates a constant array expression representing the given array. Note that the constant array created does not have any operands. Only allowed in stateHxState.Modeling.- Parameters:
values- array of constant values.- Returns:
- Created constant array expression.
- Since:
- 13.5
-
createExpression
public HxExpression createExpression(HxOperator op)
Creates an expression of the given type. The expression is created without operand. Only allowed in stateHxState.Modeling. This method cannot be used to create constants: usecreateConstant(long)orcreateConstant(double)instead.- Parameters:
op- Type of expression to create.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0)
Creates an expression of the given type, with the given operand. Only allowed in stateHxState.Modeling. Useful for creating unary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0)
Creates an expression of the given type, with the given operand. Only allowed in stateHxState.Modeling. Useful for creating unary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0)
Creates an expression of the given type, with the given operand. Only allowed in stateHxState.Modeling. Useful for creating unary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, HxExpression expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0, long expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0, HxExpression expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, long expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0, double expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0, HxExpression expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, double expr1)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating binary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, HxExpression expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0, long expr1, long expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0, long expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0, HxExpression expr1, long expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long expr0, HxExpression expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, long expr1, long expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, long expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, HxExpression expr1, long expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0, double expr1, double expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0, double expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0, HxExpression expr1, double expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double expr0, HxExpression expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, double expr1, double expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, double expr1, HxExpression expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression expr0, HxExpression expr1, double expr2)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating ternary expressions.- Parameters:
op- Type of expression to create.expr0- Operand 0.expr1- Operand 1.expr2- Operand 2.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, java.lang.Iterable<HxExpression> operands)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating n-ary expressions.- Parameters:
op- Type of expression to create.operands- Operands to add.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, HxExpression... operands)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating n-ary expressions.- Parameters:
op- Type of expression to create.operands- Operands to add.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, int[] operands)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating n-ary expressions.- Parameters:
op- Type of expression to create.operands- Operands to add.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, long[] operands)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating n-ary expressions.- Parameters:
op- Type of expression to create.operands- Operands to add.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, float[] operands)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating n-ary expressions.- Parameters:
op- Type of expression to create.operands- Operands to add.- Returns:
- Created expression.
-
createExpression
public HxExpression createExpression(HxOperator op, double[] operands)
Creates an expression of the given type, with the given operands. Only allowed in stateHxState.Modeling. Useful for creating n-ary expressions.- Parameters:
op- Type of expression to create.operands- Operands to add.- Returns:
- Created expression.
-
createIntExternalFunction
public HxExpression createIntExternalFunction(HxIntExternalFunction func)
Creates an integer external function. The argument must implement
HxIntExternalFunction. When the external function is called, the argument values will be made accessible to your function through theHxExternalArgumentValues.Once you have instantiated it, you have to use
call(HxExpression... operands)to call it in your model.Note 1: Most of the time your external function will be called when the optimizer is in state
HxState.Running. Do not attempt to call any method of the optimizer (to retrieve statistics, values of HxExpressions or whatever) in that state or an exception will be thrown. The only accessible function isHexalyOptimizer.stop().Note 2: Your functions must be thread-safe. According to the "nbThreads" parameter, Hexaly Optimizer can be multi-threaded. In that case, your external functions must be thread safe. If you cannot guarantee the thread-safety of your code, we strongly recommend you to limit the search of Hexaly Optimizer to one thread with
HxParam.setNbThreads(int).Note 3: You can provide additional data for your function (such as lower and upper bounds) with the help of the
HxExternalContextassociated with your function (seeHxExpression.getExternalContext().- Parameters:
func- External function to call.- Returns:
- The expression associated with the function.
- Since:
- 9.5
- See Also:
HxOperator.ExternalFunction
-
createDoubleExternalFunction
public HxExpression createDoubleExternalFunction(HxDoubleExternalFunction func)
Creates a double external function. The argument must implement
HxDoubleExternalFunction. When the external function is called, the argument values will be made accessible to your function through theHxExternalArgumentValues.Once you have instantiated it, you have to use
call(HxExpression... operands)to call it in your model.Note 1: Most of the time your external function will be called when the optimizer is in state
HxState.Running. Do not attempt to call any method of the optimizer (to retrieve statistics, values of HxExpressions or whatever) in that state or an exception will be thrown. The only accessible function isHexalyOptimizer.stop().Note 2: Your functions must be thread-safe. According to the "nbThreads" parameter, Hexaly Optimizer can be multi-threaded. In that case, your external functions must be thread safe. If you cannot guarantee the thread-safety of your code, we strongly recommend you to limit the search of Hexaly Optimizer to one thread with
HxParam.setNbThreads(int).Note 3: You can provide additional data for your function (such as lower and upper bounds) with the help of the
HxExternalContextassociated with your function (seeHxExpression.getExternalContext().- Parameters:
func- External function to call.- Returns:
- The expression associated with the function.
- Since:
- 9.5
- See Also:
HxOperator.ExternalFunction
-
createIntArrayExternalFunction
public HxExpression createIntArrayExternalFunction(HxIntArrayExternalFunction func)
Creates an integer array external function. The argument must implement
HxIntArrayExternalFunction. When the external function is called, the argument values will be made accessible to your function through theHxExternalArgumentValues.Once you have instantiated it, you have to use
call(HxExpression... operands)to call it in your model.Note: You can provide additional data and parameters for your function (such as the maximum number of evaluations) with the help of the
HxExternalContextassociated with your function (seeHxExpression.getExternalContext()).- Parameters:
func- External function to call.- Returns:
- The expression associated with the function.
- Since:
- 11.0
- See Also:
HxOperator.ExternalFunction
-
createDoubleArrayExternalFunction
public HxExpression createDoubleArrayExternalFunction(HxDoubleArrayExternalFunction func)
Creates a double array external function. The argument must implement
HxDoubleArrayExternalFunction. When the external function is called, the argument values will be made accessible to your function through theHxExternalArgumentValues.Once you have instantiated it, you have to use
call(HxExpression... operands)to call it in your model.Note: You can provide additional data and parameters for your function (such as the maximum number of evaluations) with the help of the
HxExternalContextassociated with your function (seeHxExpression.getExternalContext()).- Parameters:
func- External function to call.- Returns:
- The expression associated with the function.
- Since:
- 11.0
- See Also:
HxOperator.ExternalFunction
-
createLambdaFunction
public HxExpression createLambdaFunction(HxLambdaFunction0 functor)
Creates a lambda function without arguments. A lambda function is a particular expression composed of two parts:- The arguments of the function (which are also HxExpressions of type
HxOperator.Argument. - The body of the function. The body is an HxExpression that will be used to evaluate the result of the function. The body can be any HxExpression composed of any operands and operators supported by Hexaly Optimizer. Thus, the body expression can use the arguments of the function but can also capture and refer to expressions declared outside of the function.
- Parameters:
functor- A function (HxLambdaFunction0) that returns anHxExpressionthat will be used as the body of the new Hexaly Optimizer function you want to create.- Returns:
- Expression of type
HxOperator.LambdaFunction. - Since:
- 9.5
- The arguments of the function (which are also HxExpressions of type
-
createLambdaFunction
public HxExpression createLambdaFunction(HxLambdaFunction1 functor)
Creates a lambda function with one arguments. A lambda function is a particular expression composed of two parts:- The arguments of the function (which are also HxExpressions of type
HxOperator.Argument. - The body of the function. The body is an HxExpression that will be used to evaluate the result of the function. The body can be any HxExpression composed of any operands and operators supported by Hexaly Optimizer. Thus, the body expression can use the arguments of the function but can also capture and refer to expressions declared outside of the function.
HxOperator.Argument. At the end of the evaluation of your function, the returned HxExpression will be used as the body of the Hexaly Optimizer function.- Parameters:
functor- A function (HxLambdaFunction1) that accepts oneHxExpressionas argument and returns anHxExpressionthat will be used as the body of the new Hexaly Optimizer function you want to create.- Returns:
- Expression of type
HxOperator.LambdaFunction. - Since:
- 9.5
- The arguments of the function (which are also HxExpressions of type
-
createLambdaFunction
public HxExpression createLambdaFunction(HxLambdaFunction2 functor)
Creates a lambda function with two arguments. A lambda function is a particular expression composed of two parts:- The arguments of the function (which are also HxExpressions of type
HxOperator.Argument. - The body of the function. The body is an HxExpression that will be used to evaluate the result of the function. The body can be any HxExpression composed of any operands and operators supported by Hexaly Optimizer. Thus, the body expression can use the arguments of the function but can also capture and refer to expressions declared outside of the function.
HxOperator.Argumentthat corresponds to the number of arguments your function expects. At the end of the evaluation of your function, the returned HxExpression will be used as the body of the Hexaly Optimizer function.- Parameters:
functor- A function (HxLambdaFunction2) that accepts twoHxExpressionas arguments and returns anHxExpressionthat will be used as the body of the new Hexaly Optimizer function you want to create.- Returns:
- Expression of type
HxOperator.LambdaFunction. - Since:
- 9.5
- The arguments of the function (which are also HxExpressions of type
-
createLambdaFunction
public HxExpression createLambdaFunction(HxLambdaFunction3 functor)
Creates a lambda function with three arguments. A lambda function is a particular expression composed of two parts:- The arguments of the function (which are also HxExpressions of type
HxOperator.Argument. - The body of the function. The body is an HxExpression that will be used to evaluate the result of the function. The body can be any HxExpression composed of any operands and operators supported by Hexaly Optimizer. Thus, the body expression can use the arguments of the function but can also capture and refer to expressions declared outside of the function.
HxOperator.Argumentthat corresponds to the number of arguments your function expects. At the end of the evaluation of your function, the returned HxExpression will be used as the body of the Hexaly Optimizer function.- Parameters:
functor- A function (HxLambdaFunction3) that accepts threeHxExpressionas arguments and returns anHxExpressionthat will be used as the body of the new Hexaly Optimizer function you want to create.- Returns:
- Expression of type
HxOperator.LambdaFunction. - Since:
- 9.5
- The arguments of the function (which are also HxExpressions of type
-
createLambdaFunction
public HxExpression createLambdaFunction(int nbArgs, HxLambdaFunction functor)
Creates a lambda function with arguments. A lambda function is a particular expression composed of two parts:- The arguments of the function (which are also HxExpressions of type
HxOperator.Argument. - The body of the function. The body is an HxExpression that will be used to evaluate the result of the function. The body can be any HxExpression composed of any operands and operators supported by Hexaly Optimizer. Thus, the body expression can use the arguments of the function but can also capture and refer to expressions declared outside of the function.
HxOperator.Argumentthat corresponds to the number of arguments you want and your function expects. At the end of the evaluation of your function, the returned HxExpression will be used as the body of the Hexaly Optimizer function.- Parameters:
nbArgs- Number of arguments you want for your function.functor- A function (HxLambdaFunction) that acceptsHxExpressionas arguments and returns anHxExpressionthat will be used as the body of the new Hexaly Optimizer function you want to create.- Returns:
- Expression of type
HxOperator.LambdaFunction. - Since:
- 9.5
- The arguments of the function (which are also HxExpressions of type
-
boolVar
public HxExpression boolVar()
Creates a boolean decision. Binary decision variable with domain { 0, 1 }. This method is a shortcut forcreateExpression(.HxOperator.Bool)- Since:
- 5.5
- See Also:
HxOperator.Bool,createExpression(HxOperator)
-
floatVar
public HxExpression floatVar(double lb, double ub)
Creates a float decision. Decision variable with domain [lb, ub]. This method is a shortcut forcreateExpression(HxOperator.Float, lb, ub).- Parameters:
lb- Lower bound of the decision variable.ub- Upper bound of the decision variable.- Since:
- 5.5
- See Also:
HxOperator.Float,createExpression(HxOperator, double, double)
-
intVar
public HxExpression intVar(long lb, long ub)
Creates an integer decision. Decision variable with domain [lb, ub]. This method is a shortcut forcreateExpression(HxOperator.Int, lb, ub).- Parameters:
lb- Lower bound of the decision variable.ub- Upper bound of the decision variable.- Since:
- 5.5
- See Also:
HxOperator.Int,createExpression(HxOperator, long, long)
-
intervalVar
public HxExpression intervalVar(long minStart, long maxEnd)
Creates an interval decision included in [minStart, maxEnd). Start is inclusive and end is exclusive. This method is a shortcut forcreateExpression(HxOperator.Interval, minStart, maxEnd).- Parameters:
minStart- Min start of the decision variable.maxEnd- Max end of the decision variable.- Since:
- 12.0
- See Also:
HxOperator.Interval,createExpression(HxOperator, long, long)
-
start
public HxExpression start(HxExpression a)
Creates a start expression. This method is a shortcut forcreateExpression(HxOperator.Start, a).- Since:
- 12.0
- See Also:
HxOperator.Start,createExpression(HxOperator, HxExpression)
-
end
public HxExpression end(HxExpression a)
Creates an end expression. This method is a shortcut forcreateExpression(HxOperator.End, a).- Since:
- 12.0
- See Also:
HxOperator.End,createExpression(HxOperator, HxExpression)
-
length
public HxExpression length(HxExpression a)
Creates a length expression. This method is a shortcut forcreateExpression(HxOperator.Length, a).- Since:
- 12.0
- See Also:
HxOperator.Length,createExpression(HxOperator, HxExpression)
-
sum
public HxExpression sum()
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator)
-
sum
public HxExpression sum(long a)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, long)
-
sum
public HxExpression sum(HxExpression a)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a).- Since:
- 12.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, HxExpression)
-
sum
public HxExpression sum(double a)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, double)
-
sum
public HxExpression sum(HxExpression a, HxExpression b)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, HxExpression, HxExpression)
-
sum
public HxExpression sum(java.lang.Iterable<HxExpression> operands)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, operands).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, Iterable)
-
sum
public HxExpression sum(HxExpression... operands)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, operands).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, HxExpression...)
-
sum
public HxExpression sum(long a, HxExpression b)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, long, HxExpression)
-
sum
public HxExpression sum(HxExpression a, long b)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, HxExpression, long)
-
sum
public HxExpression sum(double a, HxExpression b)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, double, HxExpression)
-
sum
public HxExpression sum(HxExpression a, double b)
Creates a sum expression. This method is a shortcut forcreateExpression(HxOperator.Sum, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sum,createExpression(HxOperator, HxExpression, double)
-
sub
public HxExpression sub(HxExpression a, HxExpression b)
Creates a substraction expression. This method is a shortcut forcreateExpression(HxOperator.Sub, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sub,createExpression(HxOperator, HxExpression, HxExpression)
-
sub
public HxExpression sub(long a, HxExpression b)
Creates a substraction expression. This method is a shortcut forcreateExpression(HxOperator.Sub, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sub,createExpression(HxOperator, long, HxExpression)
-
sub
public HxExpression sub(HxExpression a, long b)
Creates a substraction expression. This method is a shortcut forcreateExpression(HxOperator.Sub, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sub,createExpression(HxOperator, HxExpression, long)
-
sub
public HxExpression sub(double a, HxExpression b)
Creates a substraction expression. This method is a shortcut forcreateExpression(HxOperator.Sub, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sub,createExpression(HxOperator, double, HxExpression)
-
sub
public HxExpression sub(HxExpression a, double b)
Creates a substraction expression. This method is a shortcut forcreateExpression(HxOperator.Sub, a, b).- Since:
- 5.5
- See Also:
HxOperator.Sub,createExpression(HxOperator, HxExpression, double)
-
prod
public HxExpression prod()
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator)
-
prod
public HxExpression prod(long a)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, long)
-
prod
public HxExpression prod(double a)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, double)
-
prod
public HxExpression prod(HxExpression a)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a).- Since:
- 12.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, HxExpression)
-
prod
public HxExpression prod(HxExpression a, HxExpression b)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, HxExpression, HxExpression)
-
prod
public HxExpression prod(HxExpression... operands)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, operands).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, HxExpression...)
-
prod
public HxExpression prod(java.lang.Iterable<HxExpression> operands)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, operands).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, Iterable)
-
prod
public HxExpression prod(HxExpression a, long b)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, HxExpression, long)
-
prod
public HxExpression prod(long a, HxExpression b)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, long, HxExpression)
-
prod
public HxExpression prod(HxExpression a, double b)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, HxExpression, double)
-
prod
public HxExpression prod(double a, HxExpression b)
Creates a product expression. This method is a shortcut forcreateExpression(HxOperator.Prod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Prod,createExpression(HxOperator, double, HxExpression)
-
max
public HxExpression max()
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator)
-
max
public HxExpression max(long a)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, long)
-
max
public HxExpression max(double a)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, double)
-
max
public HxExpression max(HxExpression a)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a).- Since:
- 12.5
- See Also:
HxOperator.Max,createExpression(HxOperator, HxExpression)
-
max
public HxExpression max(HxExpression a, HxExpression b)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a, b).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, HxExpression, HxExpression)
-
max
public HxExpression max(java.lang.Iterable<HxExpression> operands)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, operands).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, Iterable)
-
max
public HxExpression max(HxExpression... operands)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, operands).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, HxExpression... operands)
-
max
public HxExpression max(HxExpression a, long b)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a, b).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, HxExpression, long)
-
max
public HxExpression max(long a, HxExpression b)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a, b).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, long, HxExpression)
-
max
public HxExpression max(HxExpression a, double b)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a, b).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, HxExpression, double)
-
max
public HxExpression max(double a, HxExpression b)
Creates a maximum expression. This method is a shortcut forcreateExpression(HxOperator.Max, a, b).- Since:
- 5.5
- See Also:
HxOperator.Max,createExpression(HxOperator, double, HxExpression)
-
min
public HxExpression min()
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator)
-
min
public HxExpression min(long a)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, long)
-
min
public HxExpression min(double a)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, double)
-
min
public HxExpression min(HxExpression a)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a).- Since:
- 12.5
- See Also:
HxOperator.Min,createExpression(HxOperator, HxExpression)
-
min
public HxExpression min(HxExpression a, HxExpression b)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a, b).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, HxExpression, HxExpression)
-
min
public HxExpression min(HxExpression... operands)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, operands).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, HxExpression...)
-
min
public HxExpression min(java.lang.Iterable<HxExpression> operands)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, operands).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, Iterable)
-
min
public HxExpression min(HxExpression a, long b)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a, b).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, HxExpression, long)
-
min
public HxExpression min(long a, HxExpression b)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a, b).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, long, HxExpression)
-
min
public HxExpression min(HxExpression a, double b)
Creates a minimum expression.- Since:
- 5.5
- See Also:
HxOperator.Min
-
min
public HxExpression min(double a, HxExpression b)
Creates a minimum expression. This method is a shortcut forcreateExpression(HxOperator.Min, a, b).- Since:
- 5.5
- See Also:
HxOperator.Min,createExpression(HxOperator, double, HxExpression)
-
eq
public HxExpression eq(HxExpression a, HxExpression b)
Creates an equality expression. This method is a shortcut forcreateExpression(HxOperator.Eq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Eq,createExpression(HxOperator, HxExpression, HxExpression)
-
eq
public HxExpression eq(HxExpression a, long b)
Creates an equality expression. This method is a shortcut forcreateExpression(HxOperator.Eq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Eq,createExpression(HxOperator, HxExpression, long)
-
eq
public HxExpression eq(long a, HxExpression b)
Creates an equality expression. This method is a shortcut forcreateExpression(HxOperator.Eq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Eq,createExpression(HxOperator, long, HxExpression)
-
eq
public HxExpression eq(HxExpression a, double b)
Creates an equality expression. This method is a shortcut forcreateExpression(HxOperator.Eq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Eq,createExpression(HxOperator, HxExpression, double)
-
eq
public HxExpression eq(double a, HxExpression b)
Creates an equality expression. This method is a shortcut forcreateExpression(HxOperator.Eq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Eq,createExpression(HxOperator, double, HxExpression)
-
neq
public HxExpression neq(HxExpression a, HxExpression b)
Creates a disequality expression. This method is a shortcut forcreateExpression(HxOperator.Neq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Neq,createExpression(HxOperator, HxExpression, HxExpression)
-
neq
public HxExpression neq(HxExpression a, long b)
Creates a disequality expression. This method is a shortcut forcreateExpression(HxOperator.Neq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Neq,createExpression(HxOperator, HxExpression, long)
-
neq
public HxExpression neq(long a, HxExpression b)
Creates a disequality expression. This method is a shortcut forcreateExpression(HxOperator.Neq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Neq,createExpression(HxOperator, long, HxExpression)
-
neq
public HxExpression neq(HxExpression a, double b)
Creates a disequality expression. This method is a shortcut forcreateExpression(HxOperator.Neq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Neq,createExpression(HxOperator, HxExpression, double)
-
neq
public HxExpression neq(double a, HxExpression b)
Creates a disequality expression. This method is a shortcut forcreateExpression(HxOperator.Neq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Neq,createExpression(HxOperator, double, HxExpression)
-
geq
public HxExpression geq(HxExpression a, HxExpression b)
Creates an inequality expression greater than or equal to. This method is a shortcut forcreateExpression(HxOperator.Geq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Geq,createExpression(HxOperator, HxExpression, HxExpression)
-
geq
public HxExpression geq(HxExpression a, long b)
Creates an inequality expression greater than or equal to. This method is a shortcut forcreateExpression(HxOperator.Geq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Geq,createExpression(HxOperator, HxExpression, long)
-
geq
public HxExpression geq(long a, HxExpression b)
Creates an inequality expression greater than or equal to. This method is a shortcut forcreateExpression(HxOperator.Geq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Geq,createExpression(HxOperator, long, HxExpression)
-
geq
public HxExpression geq(HxExpression a, double b)
Creates an inequality expression greater than or equal to. This method is a shortcut forcreateExpression(HxOperator.Geq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Geq,createExpression(HxOperator, HxExpression, double)
-
geq
public HxExpression geq(double a, HxExpression b)
Creates an inequality expression greater than or equal to. This method is a shortcut forcreateExpression(HxOperator.Geq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Geq,createExpression(HxOperator, double, HxExpression)
-
leq
public HxExpression leq(HxExpression a, HxExpression b)
Creates an inequality expression less than or equal to. This method is a shortcut forcreateExpression(HxOperator.Leq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Leq,createExpression(HxOperator, HxExpression, HxExpression)
-
leq
public HxExpression leq(HxExpression a, long b)
Creates an inequality expression less than or equal to. This method is a shortcut forcreateExpression(HxOperator.Leq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Leq,createExpression(HxOperator, HxExpression, long)
-
leq
public HxExpression leq(long a, HxExpression b)
Creates an inequality expression less than or equal to. This method is a shortcut forcreateExpression(HxOperator.Leq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Leq,createExpression(HxOperator, long, HxExpression)
-
leq
public HxExpression leq(HxExpression a, double b)
Creates an inequality expression less than or equal to. This method is a shortcut forcreateExpression(HxOperator.Leq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Leq,createExpression(HxOperator, HxExpression, double)
-
leq
public HxExpression leq(double a, HxExpression b)
Creates an inequality expression less than or equal to. This method is a shortcut forcreateExpression(HxOperator.Leq, a, b).- Since:
- 5.5
- See Also:
HxOperator.Leq,createExpression(HxOperator, double, HxExpression)
-
gt
public HxExpression gt(HxExpression a, HxExpression b)
Creates an inequality expression greater than. This method is a shortcut forcreateExpression(HxOperator.Gt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Gt,createExpression(HxOperator, HxExpression, HxExpression)
-
gt
public HxExpression gt(HxExpression a, long b)
Creates an inequality expression greater than. This method is a shortcut forcreateExpression(HxOperator.Gt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Gt,createExpression(HxOperator, HxExpression, long)
-
gt
public HxExpression gt(long a, HxExpression b)
Creates an inequality expression greater than. This method is a shortcut forcreateExpression(HxOperator.Gt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Gt,createExpression(HxOperator, long, HxExpression)
-
gt
public HxExpression gt(HxExpression a, double b)
Creates an inequality expression greater than. This method is a shortcut forcreateExpression(HxOperator.Gt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Gt,createExpression(HxOperator, HxExpression, double)
-
gt
public HxExpression gt(double a, HxExpression b)
Creates an inequality expression greater than. This method is a shortcut forcreateExpression(HxOperator.Gt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Gt,createExpression(HxOperator, double, HxExpression)
-
lt
public HxExpression lt(HxExpression a, HxExpression b)
Creates an inequality expression less than. This method is a shortcut forcreateExpression(HxOperator.Lt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Lt,createExpression(HxOperator, HxExpression, HxExpression)
-
lt
public HxExpression lt(HxExpression a, long b)
Creates an inequality expression less than. This method is a shortcut forcreateExpression(HxOperator.Lt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Lt,createExpression(HxOperator, HxExpression, long)
-
lt
public HxExpression lt(long a, HxExpression b)
Creates an inequality expression less than. This method is a shortcut forcreateExpression(HxOperator.Lt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Lt,createExpression(HxOperator, long, HxExpression)
-
lt
public HxExpression lt(HxExpression a, double b)
Creates an inequality expression less than. This method is a shortcut forcreateExpression(HxOperator.Lt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Lt,createExpression(HxOperator, HxExpression, double)
-
lt
public HxExpression lt(double a, HxExpression b)
Creates an inequality expression less than. This method is a shortcut forcreateExpression(HxOperator.Lt, a, b).- Since:
- 5.5
- See Also:
HxOperator.Lt,createExpression(HxOperator, double, HxExpression)
-
iif
public HxExpression iif(HxExpression a, HxExpression b, HxExpression c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
HxOperator.If,createExpression(HxOperator, HxExpression, HxExpression, HxExpression)
-
iif
public HxExpression iif(HxExpression a, HxExpression b, long c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
HxOperator.If,createExpression(HxOperator, HxExpression, HxExpression, long)
-
iif
public HxExpression iif(HxExpression a, long b, HxExpression c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
HxOperator.If,createExpression(HxOperator, HxExpression, long, HxExpression)
-
iif
public HxExpression iif(HxExpression a, long b, long c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
HxOperator.If,createExpression(HxOperator, HxExpression, long, long)
-
iif
public HxExpression iif(HxExpression a, HxExpression b, double c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
HxOperator.If,createExpression(HxOperator, HxExpression, HxExpression, double)
-
iif
public HxExpression iif(HxExpression a, double b, HxExpression c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
createExpression(HxOperator, HxExpression, double, HxExpression),HxOperator.If
-
iif
public HxExpression iif(HxExpression a, double b, double c)
Creates a ternary conditional expression. This method is a shortcut forcreateExpression(HxOperator.If, a, b, c).- Since:
- 5.5
- See Also:
HxOperator.If,createExpression(HxOperator, HxExpression, double, double)
-
not
public HxExpression not(HxExpression a)
Creates a NOT expression. This method is a shortcut forcreateExpression(HxOperator.Not, a).- Since:
- 5.5
- See Also:
HxOperator.Not,createExpression(HxOperator, HxExpression)
-
and
public HxExpression and()
Creates an AND expression. This method is a shortcut forcreateExpression(HxOperator.And).- Since:
- 5.5
- See Also:
HxOperator.And,createExpression(HxOperator)
-
and
public HxExpression and(HxExpression a)
Creates an AND expression. This method is a shortcut forcreateExpression(HxOperator.And, a).- Since:
- 12.5
- See Also:
HxOperator.And,createExpression(HxOperator, HxExpression)
-
and
public HxExpression and(HxExpression a, HxExpression b)
Creates an AND expression. This method is a shortcut forcreateExpression(HxOperator.And, a, b).- Since:
- 5.5
- See Also:
HxOperator.And,createExpression(HxOperator, HxExpression, HxExpression)
-
and
public HxExpression and(java.lang.Iterable<HxExpression> operands)
Creates an AND expression. This method is a shortcut forcreateExpression(HxOperator.And, operands).- Since:
- 5.5
- See Also:
HxOperator.And,createExpression(HxOperator, Iterable)
-
and
public HxExpression and(HxExpression... operands)
Creates an AND expression. This method is a shortcut forcreateExpression(HxOperator.And, operands).- Since:
- 5.5
- See Also:
HxOperator.And,createExpression(HxOperator, HxExpression...)
-
or
public HxExpression or()
Creates a OR expression. This method is a shortcut forcreateExpression(HxOperator.Or).- Since:
- 5.5
- See Also:
HxOperator.Or,createExpression(HxOperator)
-
or
public HxExpression or(HxExpression a)
Creates a OR expression. This method is a shortcut forcreateExpression(HxOperator.Or, a).- Since:
- 12.5
- See Also:
HxOperator.Or,createExpression(HxOperator, HxExpression)
-
or
public HxExpression or(HxExpression a, HxExpression b)
Creates a OR expression. This method is a shortcut forcreateExpression(HxOperator.Or, a, b).- Since:
- 5.5
- See Also:
HxOperator.Or,createExpression(HxOperator, HxExpression, HxExpression)
-
or
public HxExpression or(java.lang.Iterable<HxExpression> operands)
Creates a OR expression. This method is a shortcut forcreateExpression(HxOperator.Or, operands).- Since:
- 5.5
- See Also:
HxOperator.Or,createExpression(HxOperator, Iterable)
-
or
public HxExpression or(HxExpression... operands)
Creates a OR expression. This method is a shortcut forcreateExpression(HxOperator.Or, operands).- Since:
- 5.5
- See Also:
HxOperator.Or,createExpression(HxOperator, HxExpression...)
-
xor
public HxExpression xor()
Creates a XOR expression. This method is a shortcut forcreateExpression(HxOperator.Xor).- Since:
- 5.5
- See Also:
HxOperator.Xor,createExpression(HxOperator)
-
xor
public HxExpression xor(HxExpression a)
Creates a XOR expression. This method is a shortcut forcreateExpression(HxOperator.Xor, a).- Since:
- 12.5
- See Also:
HxOperator.Xor,createExpression(HxOperator, HxExpression)
-
xor
public HxExpression xor(HxExpression... operands)
Creates a XOR expression. This method is a shortcut forcreateExpression(HxOperator.Xor, operands).- Since:
- 5.5
- See Also:
HxOperator.Xor,createExpression(HxOperator, HxExpression...)
-
xor
public HxExpression xor(HxExpression a, HxExpression b)
Creates a XOR expression. This method is a shortcut forcreateExpression(HxOperator.Xor, a, b).- Since:
- 5.5
- See Also:
HxOperator.Xor,createExpression(HxOperator, HxExpression, HxExpression)
-
xor
public HxExpression xor(java.lang.Iterable<HxExpression> operands)
Creates a XOR expression. This method is a shortcut forcreateExpression(HxOperator.Xor, operands).- Since:
- 5.5
- See Also:
HxOperator.Xor,createExpression(HxOperator, Iterable)
-
abs
public HxExpression abs(HxExpression a)
Creates an absolute value expression. This method is a shortcut forcreateExpression(HxOperator.Abs, a).- Since:
- 5.5
- See Also:
HxOperator.Abs,createExpression(HxOperator, HxExpression)
-
dist
public HxExpression dist(HxExpression a, HxExpression b)
Creates a distance expression. This method is a shortcut forcreateExpression(HxOperator.Dist, a, b).- Since:
- 5.5
- See Also:
HxOperator.Dist,createExpression(HxOperator, HxExpression, HxExpression)
-
dist
public HxExpression dist(HxExpression a, long b)
Creates a distance expression. This method is a shortcut forcreateExpression(HxOperator.Dist, a, b).- Since:
- 5.5
- See Also:
HxOperator.Dist,createExpression(HxOperator, HxExpression, long)
-
dist
public HxExpression dist(long a, HxExpression b)
Creates a distance expression. This method is a shortcut forcreateExpression(HxOperator.Dist, a, b).- Since:
- 5.5
- See Also:
HxOperator.Dist,createExpression(HxOperator, long, HxExpression)
-
dist
public HxExpression dist(HxExpression a, double b)
Creates a distance expression. This method is a shortcut forcreateExpression(HxOperator.Dist, a, b).- Since:
- 5.5
- See Also:
HxOperator.Dist,createExpression(HxOperator, HxExpression, double)
-
dist
public HxExpression dist(double a, HxExpression b)
Creates a distance expression. This method is a shortcut forcreateExpression(HxOperator.Dist, a, b).- Since:
- 5.5
- See Also:
HxOperator.Dist,createExpression(HxOperator, double, HxExpression)
-
div
public HxExpression div(HxExpression a, HxExpression b)
Creates a division expression. This method is a shortcut forcreateExpression(HxOperator.Div, a, b).- Since:
- 5.5
- See Also:
HxOperator.Div,createExpression(HxOperator, HxExpression, HxExpression)
-
div
public HxExpression div(HxExpression a, long b)
Creates a division expression. This method is a shortcut forcreateExpression(HxOperator.Div, a, b).- Since:
- 5.5
- See Also:
HxOperator.Div,createExpression(HxOperator, HxExpression, long)
-
div
public HxExpression div(long a, HxExpression b)
Creates a division expression. This method is a shortcut forcreateExpression(HxOperator.Div, a, b).- Since:
- 5.5
- See Also:
HxOperator.Div,createExpression(HxOperator, long, HxExpression)
-
div
public HxExpression div(HxExpression a, double b)
Creates a division expression. This method is a shortcut forcreateExpression(HxOperator.Div, a, b).- Since:
- 5.5
- See Also:
HxOperator.Div,createExpression(HxOperator, HxExpression, double)
-
div
public HxExpression div(double a, HxExpression b)
Creates a division expression. This method is a shortcut forcreateExpression(HxOperator.Div, a, b).- Since:
- 5.5
- See Also:
HxOperator.Div,createExpression(HxOperator, double, HxExpression)
-
mod
public HxExpression mod(HxExpression a, HxExpression b)
Creates a modulo expression. This method is a shortcut forcreateExpression(HxOperator.Mod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Mod,createExpression(HxOperator, HxExpression, HxExpression)
-
mod
public HxExpression mod(HxExpression a, long b)
Creates a modulo expression. This method is a shortcut forcreateExpression(HxOperator.Mod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Mod,createExpression(HxOperator, HxExpression, long)
-
mod
public HxExpression mod(long a, HxExpression b)
Creates a modulo expression. This method is a shortcut forcreateExpression(HxOperator.Mod, a, b).- Since:
- 5.5
- See Also:
HxOperator.Mod,createExpression(HxOperator, long, HxExpression)
-
array
public HxExpression array()
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array).- Since:
- 5.5
- See Also:
HxOperator.Array,createExpression(HxOperator)
-
array
public HxExpression array(java.lang.Object operands)
Creates an N-dimensional array expression. This method attempts to create array in a recursive way: if an operand is iterable, it will be turned into an array too, and so on.- Since:
- 5.5
- See Also:
HxOperator.Array
-
array
public HxExpression array(int... operands)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 7.0
- See Also:
HxOperator.Array,createExpression(HxOperator, int[])
-
array
public HxExpression array(long... operands)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 5.5
- See Also:
HxOperator.Array,createExpression(HxOperator, long[])
-
array
public HxExpression array(float... operands)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 7.0
- See Also:
HxOperator.Array,createExpression(HxOperator, float[])
-
array
public HxExpression array(double... operands)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 5.5
- See Also:
HxOperator.Array,createExpression(HxOperator, double[])
-
array
public HxExpression array(HxExpression... operands)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 5.5
- See Also:
HxOperator.Array,createExpression(HxOperator, HxExpression... operands)
-
array
public HxExpression array(HxExpression range, HxExpression lambda, long defaultvalue)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 12.0
- See Also:
HxOperator.Array,createExpression(HxOperator, HxExpression, HxExpression, long)
-
array
public HxExpression array(HxExpression range, HxExpression lambda, double defaultvalue)
Creates an array expression. This method is a shortcut forcreateExpression(HxOperator.Array, operands).- Since:
- 12.0
- See Also:
HxOperator.Array,createExpression(HxOperator, HxExpression, HxExpression, double)
-
stepArray
public HxExpression stepArray(HxExpression array_1, HxExpression array_2)
Creates a stepArray expression. This method is a shortcut forcreateExpression(HxOperator.stepArray, array_1, array_2).- Since:
- 13.0
- See Also:
HxOperator.StepArray,createExpression(HxOperator, HxExpression)
-
constArray
public HxExpression constArray(long[] values)
Creates a constant array expression. This method is a shortcut forcreateConstArray(values).- Since:
- 13.5
- See Also:
HxOperator.ConstArray,createConstArray(long[])
-
constArray
public HxExpression constArray(double[] values)
Creates a constant array expression. This method is a shortcut forcreateConstArray(values).- Since:
- 13.5
- See Also:
HxOperator.ConstArray,createConstArray(double[])
-
sort
public HxExpression sort(HxExpression array)
Creates a sorted array, containing the same values as the array given as unique parameter, sorted in ascending order. This method is a shortcut forcreateExpression(HxOperator.Sort, array).- Since:
- 11.0
- See Also:
HxOperator.Sort
-
sort
public HxExpression sort(HxExpression array, HxExpression lambda)
Creates a sorted array, containing the same values as the array given as first parameter, sorted in ascending order based on the values returned by the the lambda function given as second parameter. The sort operator guarantees that the order of elements having the same key is preserved. This method is a shortcut forcreateExpression(HxOperator.Sort, array, lambda).- Since:
- 12.5
- See Also:
HxOperator.Sort
-
at
public HxExpression at(HxExpression array, HxExpression... indices)
Creates a "at" expression for N-dimensional array. This method is a shortcut forcreateExpression(HxOperator.At, array, indices).- Since:
- 5.5
- See Also:
HxOperator.At,createExpression(HxOperator, HxExpression...)
-
at
public HxExpression at(HxExpression array, long index)
Creates a "at" expression. This method is a shortcut forcreateExpression(HxOperator.At, array, index).- Since:
- 5.5
- See Also:
HxOperator.At,createExpression(HxOperator, HxExpression, long)
-
scalar
public HxExpression scalar(HxExpression a, HxExpression b)
Creates an expression for the scalar product between two arrays. This method is a shortcut forcreateExpression(HxOperator.Scalar, a, b).- Since:
- 5.5
- See Also:
HxOperator.Scalar,createExpression(HxOperator, HxExpression, HxExpression)
-
ceil
public HxExpression ceil(HxExpression a)
Creates a ceil expression. This method is a shortcut forcreateExpression(HxOperator.Ceil, a).- Since:
- 5.5
- See Also:
HxOperator.Ceil,createExpression(HxOperator, HxExpression)
-
floor
public HxExpression floor(HxExpression a)
Creates a floor expression. This method is a shortcut forcreateExpression(HxOperator.Floor, a).- Since:
- 5.5
- See Also:
HxOperator.Floor,createExpression(HxOperator, HxExpression)
-
round
public HxExpression round(HxExpression a)
Creates a rounding expression. This method is a shortcut forcreateExpression(HxOperator.Round, a).- Since:
- 5.5
- See Also:
HxOperator.Round,createExpression(HxOperator, HxExpression)
-
sqrt
public HxExpression sqrt(HxExpression a)
Creates a square root expression. This method is a shortcut forcreateExpression(HxOperator.Sqrt, a).- Since:
- 5.5
- See Also:
HxOperator.Sqrt,createExpression(HxOperator, HxExpression)
-
log
public HxExpression log(HxExpression a)
Creates a log expression. This method is a shortcut forcreateExpression(HxOperator.Log, a).- Since:
- 5.5
- See Also:
HxOperator.Log,createExpression(HxOperator, HxExpression)
-
exp
public HxExpression exp(HxExpression a)
Creates an exponential expression. This method is a shortcut forcreateExpression(HxOperator.Exp, a).- Since:
- 5.5
- See Also:
HxOperator.Exp,createExpression(HxOperator, HxExpression)
-
pow
public HxExpression pow(HxExpression a, HxExpression b)
Creates a power expression. This method is a shortcut forcreateExpression(HxOperator.Pow, a, b).- Since:
- 5.5
- See Also:
HxOperator.Pow,createExpression(HxOperator, HxExpression, HxExpression)
-
pow
public HxExpression pow(HxExpression a, long b)
Creates a power expression. This method is a shortcut forcreateExpression(HxOperator.Pow, a, b).- Since:
- 5.5
- See Also:
HxOperator.Pow,createExpression(HxOperator, HxExpression, long)
-
pow
public HxExpression pow(long a, HxExpression b)
Creates a power expression. This method is a shortcut forcreateExpression(HxOperator.Pow, a, b).- Since:
- 5.5
- See Also:
HxOperator.Pow,createExpression(HxOperator, long, HxExpression)
-
pow
public HxExpression pow(HxExpression a, double b)
Creates a power expression. This method is a shortcut forcreateExpression(HxOperator.Pow, a, b).- Since:
- 5.5
- See Also:
HxOperator.Pow,createExpression(HxOperator, HxExpression, double)
-
pow
public HxExpression pow(double a, HxExpression b)
Creates a power expression. This method is a shortcut forcreateExpression(HxOperator.Pow, a, b).- Since:
- 5.5
- See Also:
HxOperator.Pow,createExpression(HxOperator, double, HxExpression)
-
cos
public HxExpression cos(HxExpression a)
Creates a cosine expression. This method is a shortcut forcreateExpression(HxOperator.Cos, a).- Since:
- 5.5
- See Also:
HxOperator.Cos,createExpression(HxOperator, HxExpression)
-
sin
public HxExpression sin(HxExpression a)
Creates a sine expression. This method is a shortcut forcreateExpression(HxOperator.Sin, a).- Since:
- 5.5
- See Also:
HxOperator.Sin,createExpression(HxOperator, HxExpression)
-
tan
public HxExpression tan(HxExpression a)
Creates a tangent expression. This method is a shortcut forcreateExpression(HxOperator.Tan, a).- Since:
- 5.5
- See Also:
HxOperator.Tan,createExpression(HxOperator, HxExpression)
-
piecewise
public HxExpression piecewise(HxExpression abscissae, HxExpression ordinates, HxExpression x)
Creates a piecewise linear expression. This method is a shortcut forcreateExpression(HxOperator.Piecewise, abscissae, ordinates, x).- Since:
- 5.5
- See Also:
HxOperator.Piecewise,createExpression(HxOperator, HxExpression, HxExpression, HxExpression)
-
listVar
public HxExpression listVar(long n)
Creates a list decision with the given length. A list is an ordered collection of integers within a range [0, n-1]. This method is a shortcut forcreateExpression(HxOperator.List, n).- Parameters:
n- Collection size.- Since:
- 5.5
- See Also:
HxOperator.List,createExpression(HxOperator, long)
-
setVar
public HxExpression setVar(long n)
Creates a set decision with the given length. A set is an unordered collection of integers within a domain [0, n-1]. This method is a shortcut forcreateExpression(HxOperator.Set, n).- Parameters:
n- Collection size.- Since:
- 8.0
- See Also:
HxOperator.Set,createExpression(HxOperator, long)
-
count
public HxExpression count(HxExpression a)
Creates a count expression. This method is a shortcut forcreateExpression(HxOperator.Count, a).- Since:
- 5.5
- See Also:
HxOperator.Count,createExpression(HxOperator, HxExpression)
-
indexOf
public HxExpression indexOf(HxExpression a, long b)
Creates an indexOf expression. This method is a shortcut forcreateExpression(HxOperator.IndexOf, a, b).- Since:
- 5.5
- See Also:
HxOperator.IndexOf,createExpression(HxOperator, HxExpression, long)
-
indexOf
public HxExpression indexOf(HxExpression a, HxExpression b)
Creates an indexOf expression. This method is a shortcut forcreateExpression(HxOperator.IndexOf, a, b).- Since:
- 5.5
- See Also:
HxOperator.IndexOf,createExpression(HxOperator, HxExpression, HxExpression)
-
distinct
public HxExpression distinct(HxExpression a)
Creates an distinct expression. This method is a shortcut forcreateExpression(HxOperator.Distinct, a).- Since:
- 12.5
- See Also:
HxOperator.Distinct,createExpression(HxOperator, HxExpression)
-
distinct
public HxExpression distinct(HxExpression a, HxExpression b)
Creates an distinct expression. This method is a shortcut forcreateExpression(HxOperator.Distinct, a, b).- Since:
- 12.5
- See Also:
HxOperator.Distinct,createExpression(HxOperator, HxExpression, HxExpression)
-
intersection
public HxExpression intersection(HxExpression a, HxExpression b)
Creates an intersection expression. This method is a shortcut forcreateExpression(HxOperator.Intersection, a, b).- Since:
- 12.5
- See Also:
HxOperator.Intersection,createExpression(HxOperator, HxExpression, HxExpression)
-
intersection
public HxExpression intersection(HxExpression... operands)
Creates an intersection expression of n intervals. This method is a shortcut forcreateExpression(HxOperator.Intersection, operands).- Since:
- 13.5
- See Also:
HxOperator.Intersection,createExpression(HxOperator, HxExpression...)
-
union
public HxExpression union(HxExpression... operands)
Creates an union expression of n iterables. This method is a shortcut forcreateExpression(HxOperator.Union, operands).- Since:
- 13.5
- See Also:
HxOperator.Union,createExpression(HxOperator, HxExpression...)
-
hull
public HxExpression hull(HxExpression... operands)
Creates a hull expression. This method is a shortcut forcreateExpression(HxOperator.hull, operands).- Since:
- 13.0
- See Also:
HxOperator.Hull,createExpression(HxOperator, HxExpression...)
-
hull
public HxExpression hull(HxExpression array)
Creates a hull expression. This method is a shortcut forcreateExpression(HxOperator.hull, array).- Since:
- 13.0
- See Also:
HxOperator.Hull,createExpression(HxOperator, HxExpression)
-
hull
public HxExpression hull()
Creates a hull expression. This method is a shortcut forcreateExpression(HxOperator.hull).- Since:
- 13.0
- See Also:
HxOperator.Hull,createExpression(HxOperator)
-
contains
public HxExpression contains(HxExpression a, long b)
Creates a contains expression. This method is a shortcut forcreateExpression(HxOperator.Contains, a, b).- Since:
- 7.5
- See Also:
HxOperator.Contains,createExpression(HxOperator, HxExpression, long)
-
contains
public HxExpression contains(HxExpression a, HxExpression b)
Creates a contains expression. This method is a shortcut forcreateExpression(HxOperator.Contains, a, b).- Since:
- 7.5
- See Also:
HxOperator.Contains,createExpression(HxOperator, HxExpression, HxExpression)
-
partition
public HxExpression partition()
Creates a partition expression. This method is a shortcut forcreateExpression(HxOperator.Partition).- Since:
- 5.5
- See Also:
HxOperator.Partition,createExpression(HxOperator)
-
partition
public HxExpression partition(HxExpression... operands)
Creates a partition expression. This method is a shortcut forcreateExpression(HxOperator.Partition, operands).- Since:
- 5.5
- See Also:
HxOperator.Partition,createExpression(HxOperator, HxExpression...)
-
partition
public HxExpression partition(java.lang.Iterable<HxExpression> operands)
Creates a partition expression. This method is a shortcut forcreateExpression(HxOperator.Partition, operands).- Since:
- 5.5
- See Also:
HxOperator.Partition,createExpression(HxOperator, Iterable)
-
partition
public HxExpression partition(HxExpression array)
Creates a partition expression. This method is a shortcut forcreateExpression(HxOperator.Partition, array).- Since:
- 10.5
- See Also:
HxOperator.Partition,createExpression(HxOperator, HxExpression)
-
disjoint
public HxExpression disjoint()
Creates a disjoint expression. This method is a shortcut forcreateExpression(HxOperator.Disjoint).- Since:
- 5.5
- See Also:
HxOperator.Disjoint,createExpression(HxOperator)
-
disjoint
public HxExpression disjoint(HxExpression... operands)
Creates a disjoint expression. This method is a shortcut forcreateExpression(HxOperator.Disjoint, operands).- Since:
- 5.5
- See Also:
HxOperator.Disjoint,createExpression(HxOperator, HxExpression... operands)
-
disjoint
public HxExpression disjoint(java.lang.Iterable<HxExpression> operands)
Creates a disjoint expression. This method is a shortcut forcreateExpression(HxOperator.Disjoint, operands).- Since:
- 5.5
- See Also:
HxOperator.Disjoint,createExpression(HxOperator, Iterable)
-
disjoint
public HxExpression disjoint(HxExpression array)
Creates a disjoint expression. This method is a shortcut forcreateExpression(HxOperator.Disjoint, array).- Since:
- 10.5
- See Also:
HxOperator.Disjoint,createExpression(HxOperator, HxExpression)
-
cover
public HxExpression cover()
Creates a cover expression. This method is a shortcut forcreateExpression(HxOperator.Cover).- Since:
- 10.5
- See Also:
HxOperator.Cover,createExpression(HxOperator)
-
cover
public HxExpression cover(HxExpression... operands)
Creates a cover expression. This method is a shortcut forcreateExpression(HxOperator.Cover, operands).- Since:
- 10.5
- See Also:
HxOperator.Cover,createExpression(HxOperator, HxExpression...)
-
cover
public HxExpression cover(java.lang.Iterable<HxExpression> operands)
Creates a cover expression. This method is a shortcut forcreateExpression(HxOperator.Cover, operands).- Since:
- 10.5
- See Also:
HxOperator.Cover,createExpression(HxOperator, Iterable)
-
cover
public HxExpression cover(HxExpression array)
Creates a cover expression. This method is a shortcut forcreateExpression(HxOperator.Cover, array).- Since:
- 10.5
- See Also:
HxOperator.Cover,createExpression(HxOperator, HxExpression)
-
find
public HxExpression find(HxExpression a, long b)
Creates a find expression. This method is a shortcut forcreateExpression(HxOperator.Find, a, b).- Since:
- 10.5
- See Also:
HxOperator.Find,createExpression(HxOperator, HxExpression, long)
-
find
public HxExpression find(HxExpression a, HxExpression b)
Creates a find expression. This method is a shortcut forcreateExpression(HxOperator.Find, a, b).- Since:
- 10.5
- See Also:
HxOperator.Find,createExpression(HxOperator, HxExpression, HxExpression)
-
intExternalFunction
public HxExpression intExternalFunction(HxIntExternalFunction func)
Creates an external function expression. This method is a shortcut forcreateIntExternalFunction(func).
-
doubleExternalFunction
public HxExpression doubleExternalFunction(HxDoubleExternalFunction func)
Creates an external function expression. This method is a shortcut forcreateDoubleExternalFunction(func).
-
intArrayExternalFunction
public HxExpression intArrayExternalFunction(HxIntArrayExternalFunction func)
Creates an external function expression. This method is a shortcut forcreateIntArrayExternalFunction(func)
-
doubleArrayExternalFunction
public HxExpression doubleArrayExternalFunction(HxDoubleArrayExternalFunction func)
Creates an external function expression. This method is a shortcut forcreateDoubleArrayExternalFunction(func)
-
lambdaFunction
public HxExpression lambdaFunction(int nbArgs, HxLambdaFunction functor)
Creates a lambda function expression. This method is a shortcut forcreateLambdaFunction(nbArgs, functor).- Since:
- 9.5
- See Also:
HxOperator.LambdaFunction,createLambdaFunction(int, HxLambdaFunction)
-
lambdaFunction
public HxExpression lambdaFunction(HxLambdaFunction0 functor)
Creates a lambda function expression. This method is a shortcut forcreateLambdaFunction(functor).- Since:
- 9.5
- See Also:
HxOperator.LambdaFunction,createLambdaFunction(HxLambdaFunction0)
-
lambdaFunction
public HxExpression lambdaFunction(HxLambdaFunction1 functor)
Creates a lambda function expression. This method is a shortcut forcreateLambdaFunction(functor).- Since:
- 9.5
- See Also:
HxOperator.LambdaFunction,createLambdaFunction(HxLambdaFunction1)
-
lambdaFunction
public HxExpression lambdaFunction(HxLambdaFunction2 functor)
Creates a lambda function expression. This method is a shortcut forcreateLambdaFunction(functor).- Since:
- 9.5
- See Also:
HxOperator.LambdaFunction,createLambdaFunction(HxLambdaFunction2)
-
lambdaFunction
public HxExpression lambdaFunction(HxLambdaFunction3 functor)
Creates a lambda function expression. This method is a shortcut forcreateLambdaFunction(functor).- Since:
- 9.5
- See Also:
HxOperator.LambdaFunction,createLambdaFunction(HxLambdaFunction3)
-
call
public HxExpression call()
Creates a call expression. The first operand must be a function of typeHxOperator.LambdaFunctionorHxOperator.ExternalFunction. The other operands may be HxExpressions, booleans, integers, and doubles. They are passed to the function as arguments. This method is a shortcut forcreateExpression(HxOperator.Call).- Since:
- 6.0
- See Also:
HxOperator.Call,createExpression(HxOperator)
-
call
public HxExpression call(HxExpression a)
Creates a call expression. The first operand must be a function of typeHxOperator.LambdaFunctionorHxOperator.ExternalFunction. The other operands may be HxExpressions, booleans, integers, and doubles. They are passed to the function as arguments. This method is a shortcut forcreateExpression(HxOperator.Call).- Since:
- 6.0
- See Also:
HxOperator.Call,createExpression(HxOperator, HxExpression)
-
call
public HxExpression call(HxExpression a, HxExpression b)
Creates a call expression. The first operand must be a function of typeHxOperator.LambdaFunctionorHxOperator.ExternalFunction. The other operands may be HxExpressions, booleans, integers, and doubles. They are passed to the function as arguments. This method is a shortcut forcreateExpression(HxOperator.Call).- Since:
- 6.0
- See Also:
HxOperator.Call,createExpression(HxOperator, HxExpression, HxExpression)
-
call
public HxExpression call(HxExpression a, HxExpression b, HxExpression c)
Creates a call expression. The first operand must be a function of typeHxOperator.LambdaFunctionorHxOperator.ExternalFunction. The other operands may be HxExpressions, booleans, integers, and doubles. They are passed to the function as arguments. This method is a shortcut forcreateExpression(HxOperator.Call).- Since:
- 6.0
- See Also:
HxOperator.Call,createExpression(HxOperator, HxExpression, HxExpression, HxExpression)
-
call
public HxExpression call(HxExpression... operands)
Creates a call expression. The first operand must be a function of typeHxOperator.LambdaFunctionorHxOperator.ExternalFunction. The other operands may be HxExpressions, booleans, integers, and doubles. They are passed to the function as arguments. This method is a shortcut forcreateExpression(HxOperator.Call).- Since:
- 6.0
- See Also:
HxOperator.Call,createExpression(HxOperator, HxExpression...)
-
call
public HxExpression call(java.lang.Iterable<HxExpression> operands)
Creates a call expression. The first operand must be a function of typeHxOperator.LambdaFunctionorHxOperator.ExternalFunction. The other operands may be HxExpressions, booleans, integers, and doubles. They are passed to the function as arguments. This method is a shortcut forcreateExpression(HxOperator.Call).- Since:
- 6.0
- See Also:
HxOperator.Call,createExpression(HxOperator, Iterable)
-
range
public HxExpression range(HxExpression a, HxExpression b)
Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive). This method is a shortcut forcreateExpression(HxOperator.Range, a, b).- Since:
- 7.0
- See Also:
HxOperator.Range,createExpression(HxOperator, HxExpression, HxExpression)
-
range
public HxExpression range(HxExpression a, long b)
Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive). This method is a shortcut forcreateExpression(HxOperator.Range, a, b).- Since:
- 7.0
- See Also:
HxOperator.Range,createExpression(HxOperator, HxExpression, long)
-
range
public HxExpression range(long a, HxExpression b)
Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive). This method is a shortcut forcreateExpression(HxOperator.Range, a, b).- Since:
- 7.0
- See Also:
HxOperator.Range,createExpression(HxOperator, long, HxExpression)
-
range
public HxExpression range(long a, long b)
Creates a range expression, where a is the lower bound (inclusive) and b is the upper bound (exclusive). This method is a shortcut forcreateExpression(HxOperator.Range, a, b).- Since:
- 7.0
- See Also:
HxOperator.Range,createExpression(HxOperator, long, long)
-
getNbExpressions
public int getNbExpressions()
Gets the number of expressions added to this model.- Returns:
- Number of expressions.
-
getExpression
public HxExpression getExpression(int exprIndex)
Gets the expression with the given index in this model.- Parameters:
exprIndex- Index of the expression.- Returns:
- Expression with the given index.
-
getExpression
public HxExpression getExpression(java.lang.String name)
Gets the expression with the given index in this model.- Parameters:
name- Name of the expression.- Returns:
- Expression with the given index.
-
getNbDecisions
public int getNbDecisions()
Gets the number of decisions in the model. This corresponds to the number of decision variables declared in the model.- Returns:
- Number of decisions.
-
getDecision
public HxExpression getDecision(int decisionIndex)
Gets the decision with the given index.- Parameters:
decisionIndex- Index of the decision.- Returns:
- Decision with the given index.
-
addConstraint
public void addConstraint(HxExpression expr)
Adds the given expression to the list of constraints. It means that the value of this expression must be constrained to be equal to 1 in any solution found by the optimizer. Hence, only boolean expressions (that is, expressions whose value is boolean) can be constrained. Only allowed in stateHxState.Modeling. If the expression is already a constraint, this method does nothing and returns immediately.- Parameters:
expr- Expression.
-
constraint
public void constraint(HxExpression expr)
Shortcut for addConstraint(expr).- Parameters:
expr- Expression.- Since:
- 5.5
- See Also:
addConstraint(com.hexaly.optimizer.HxExpression)
-
removeConstraint
public void removeConstraint(HxExpression expr)
Removes the given expression from the list of constraints. If the expression was not constrained, this method does nothing and returns immediately. Only allowed in stateHxState.Modeling.- Parameters:
expr- Expression.- Since:
- 5.0
-
removeConstraint
public void removeConstraint(int constraintIndex)
Removes the constraint at the given position in the list of constraints. Only allowed in stateHxState.Modeling.- Parameters:
constraintIndex- position of the constraint to remove.- Since:
- 5.0
-
getNbConstraints
public int getNbConstraints()
Gets the number of constraints added to this model.- Returns:
- Number of constraints.
-
getConstraint
public HxExpression getConstraint(int constraintIndex)
Gets the constraint with the given index.- Parameters:
constraintIndex- Index of the constraint.- Returns:
- Constraint with the given index.
-
addObjective
public void addObjective(HxExpression expr, HxObjectiveDirection direction)
Adds the given expression to the list of objectives to optimize. A same expression can be added more than once. Only allowed in stateHxState.Modeling. Note that the objectives will be optimized in the order in which they have been added to the model. It is useful for lexicographic multiobjective optimization, and more particularly for goal programming.- Parameters:
expr- Expression.direction- Optimization direction of this objective.
-
minimize
public void minimize(HxExpression expr)
Shortcut for addObjective(expr, OD_Minimize).- Parameters:
expr- Expression.- Since:
- 5.5
- See Also:
addObjective(com.hexaly.optimizer.HxExpression, com.hexaly.optimizer.HxObjectiveDirection)
-
maximize
public void maximize(HxExpression expr)
Shortcut for addObjective(expr, OD_Maximize).- Parameters:
expr- Expression.- Since:
- 5.5
- See Also:
addObjective(com.hexaly.optimizer.HxExpression, com.hexaly.optimizer.HxObjectiveDirection)
-
removeObjective
public void removeObjective(int objectiveIndex)
Removes the objective at the given position in the list of objectives. Note that the objectives created after the removed one have their index decreased by 1. Phases are not modified when an objective is removed. It is the user's responsibility to change the objective index of each phase to keep it coherent (withHxPhase.setOptimizedObjective(int)), or to disable it (withHxPhase.setEnabled(boolean)). Only allowed in stateHxState.Modeling.- Parameters:
objectiveIndex- position of the objective to remove.- Since:
- 5.0
-
getNbObjectives
public int getNbObjectives()
Gets the number of objectives added to this model.- Returns:
- Number of objectives.
-
getObjective
public HxExpression getObjective(int objectiveIndex)
Gets the objective with the given index.- Parameters:
objectiveIndex- Index of the objective.- Returns:
- Objective with the given index.
-
getObjectiveDirection
public HxObjectiveDirection getObjectiveDirection(int objectiveIndex)
Gets the direction of the objective with the given index.- Parameters:
objectiveIndex- Index of the objective.- Returns:
- Objective direction.
-
getNbOperands
public int getNbOperands()
Gets the number of operands in the model. This corresponds to the number of operands for all expressions declared in the model. It is an analog of the number of non zeros in matrix model encountered in mathematical programming: it gives an hint about the size and the density of your model.- Returns:
- Number of operands.
-
close
public void close()
Closes the model. Only allowed in stateHxState.Modeling. When this method is called, the optimizer is placed in stateHxState.Stopped. Once the model is closed, no expressions, constraints or objectives can be added or removed unless the model is reopened. The model must be closed before starting its resolution.
-
open
public void open()
Reopens the model. Only allowed in stateHxState.Stopped. When this method is called, the optimizer is placed in stateHxState.Modeling. In this state, the model can be modified: it is possible to add new expressions, constraints or objectives, modify expression operands, and remove existing constraints and objectives. However, existing expressions cannot be deleted. Note that the solution will be reset when the model is closed again.
-
isClosed
public boolean isClosed()
Returns true if the model is closed, false otherwise.- Returns:
- True if the model is closed.
-
toString
public java.lang.String toString()
Returns a String representation of this model. This representation provides:- The number of expressions, decisions, constraints, and objectives.
- The density of the model.
- Overrides:
toStringin classjava.lang.Object- Returns:
- String representation.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-