Class NaLoExpression
- java.lang.Object
-
- org.chocosolver.solver.expression.discrete.logical.LoExpression
-
- org.chocosolver.solver.expression.discrete.logical.NaLoExpression
-
- All Implemented Interfaces:
ArExpression,ReExpression
public class NaLoExpression 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
-
-
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 NaLoExpression(LoExpression.Operator op, ReExpression... es)Builds a n-ary expressionNaLoExpression(LoExpression.Operator op, ReExpression e, ReExpression... es)Builds a n-ary expression
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbeval(int[] values, Map<IntVar,Integer> map)BoolVarboolVar()Constraintdecompose()voidextractVar(HashSet<IntVar> variables)Extract the variables from this expressionModelgetModel()Return the associated modelStringtoString()-
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, isExpressionLeaf, le, le, lt, lt, max, max, max, min, min, min, mod, mod, mul, mul, mul, ne, ne, neg, pow, pow, sqr, sub, sub
-
-
-
-
Constructor Detail
-
NaLoExpression
public NaLoExpression(LoExpression.Operator op, ReExpression... es)
Builds a n-ary expression- Parameters:
op- an operatores- some expressions
-
NaLoExpression
public NaLoExpression(LoExpression.Operator op, ReExpression e, ReExpression... es)
Builds a n-ary expression- Parameters:
op- an operatores- some expressions
-
-
Method Detail
-
getModel
public Model getModel()
Description copied from class:LoExpressionReturn the associated model- Specified by:
getModelin interfaceArExpression- Specified by:
getModelin interfaceReExpression- Specified by:
getModelin classLoExpression- Returns:
- a Model object
-
boolVar
public BoolVar boolVar()
- Specified by:
boolVarin interfaceReExpression- Specified by:
boolVarin 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:ReExpressionExtract 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
-
-