Module org.chocosolver
Class BiArExpression
- java.lang.Object
-
- org.chocosolver.solver.expression.discrete.arithmetic.BiArExpression
-
- All Implemented Interfaces:
ArExpression
public class BiArExpression extends Object implements ArExpression
Binary arithmetic expressionProject: choco-solver.
- Since:
- 28/04/2016.
- Author:
- Charles Prud'homme
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.chocosolver.solver.expression.discrete.arithmetic.ArExpression
ArExpression.Operator
-
-
Field Summary
-
Fields inherited from interface org.chocosolver.solver.expression.discrete.arithmetic.ArExpression
NO_CHILD
-
-
Constructor Summary
Constructors Constructor Description BiArExpression(ArExpression.Operator op, ArExpression e1, ArExpression e2)
Builds a binary expression
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArExpression[]
getExpressionChild()
Model
getModel()
Return the associated modelint
getNoChild()
ArExpression.Operator
getOp()
int
ieval(int[] values, Map<IntVar,Integer> map)
IntVar
intVar()
String
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, extractVar, ge, ge, 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
-
BiArExpression
public BiArExpression(ArExpression.Operator op, ArExpression e1, ArExpression e2)
Builds a binary expression- Parameters:
op
- an operatore1
- an expressione2
- an expression
-
-
Method Detail
-
getModel
public Model getModel()
Description copied from interface:ArExpression
Return the associated model- Specified by:
getModel
in interfaceArExpression
- Returns:
- a Model object
-
getOp
public ArExpression.Operator getOp()
-
intVar
public IntVar intVar()
- Specified by:
intVar
in interfaceArExpression
- Returns:
- the arithmetic expression as an
IntVar
. If necessary, it creates intermediary variable and posts intermediary constraints
-
ieval
public int ieval(int[] values, Map<IntVar,Integer> map)
- Specified by:
ieval
in interfaceArExpression
- Parameters:
values
- int values to evaluatemap
- mapping between variables of the topmost expression and position in values- Returns:
- an evaluation of this expression with a tuple
-
getNoChild
public int getNoChild()
- Specified by:
getNoChild
in interfaceArExpression
- Returns:
- the child of this expression, or null if thid
-
getExpressionChild
public ArExpression[] getExpressionChild()
- Specified by:
getExpressionChild
in interfaceArExpression
- Returns:
- the child of this expression, or null if thid
-
-