Module org.chocosolver.solver
Class UnLoExpression
- java.lang.Object
-
- org.chocosolver.solver.expression.discrete.logical.LoExpression
-
- org.chocosolver.solver.expression.discrete.logical.UnLoExpression
-
- All Implemented Interfaces:
ArExpression
,ReExpression
public class UnLoExpression extends LoExpression
Binary arithmetic expression Project: choco-solver.- Since:
- 28/04/2016.
- Author:
- Charles Prud'homme
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.chocosolver.solver.expression.discrete.logical.LoExpression
LoExpression.Operator
-
Nested classes/interfaces inherited from interface org.chocosolver.solver.expression.discrete.arithmetic.ArExpression
ArExpression.IntPrimitive
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.expression.discrete.logical.LoExpression
me, model, op
-
Fields inherited from interface org.chocosolver.solver.expression.discrete.arithmetic.ArExpression
NO_CHILD
-
-
Constructor Summary
Constructors Constructor Description UnLoExpression(LoExpression.Operator op, ReExpression e)
Builds a n-ary expression
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
beval(int[] values, Map<IntVar,Integer> map)
BoolVar
boolVar()
Constraint
decompose()
void
extractVar(HashSet<IntVar> variables)
Extract the variables from this expressionModel
getModel()
Return the associated modelString
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.chocosolver.solver.expression.discrete.arithmetic.ArExpression
abs, add, add, add, dist, dist, div, div, eq, eq, eq, ge, ge, getExpressionChild, getNoChild, gt, gt, in, in, isExpressionLeaf, le, le, lt, lt, max, max, max, min, min, min, mod, mod, mul, mul, mul, ne, ne, neg, pow, pow, primitive, sqr, sub, sub
-
-
-
-
Constructor Detail
-
UnLoExpression
public UnLoExpression(LoExpression.Operator op, ReExpression e)
Builds a n-ary expression- Parameters:
op
- an operatore
- an expression
-
-
Method Detail
-
getModel
public Model getModel()
Description copied from class:LoExpression
Return the associated model- Specified by:
getModel
in interfaceArExpression
- Specified by:
getModel
in interfaceReExpression
- Specified by:
getModel
in classLoExpression
- Returns:
- a Model object
-
boolVar
public BoolVar boolVar()
- Specified by:
boolVar
in interfaceReExpression
- Specified by:
boolVar
in classLoExpression
- Returns:
- the logical expression as an
BoolVar
. If necessary, it creates intermediary variable and posts intermediary constraints
-
extractVar
public void extractVar(HashSet<IntVar> variables)
Description copied from interface:ReExpression
Extract the variables from this expression- Parameters:
variables
- set of variables
-
decompose
public Constraint decompose()
- Returns:
- the topmost constraint representing the expression. If needed, a call to this method creates additional variables and posts additional constraints.
-
beval
public boolean beval(int[] values, Map<IntVar,Integer> map)
- Parameters:
values
- int values to evaluatemap
- mapping between variables of the topmost expression and position in values- Returns:
- an evaluation of this relational expression based on a tuple
-
-