Class IfArExpression
- java.lang.Object
-
- org.chocosolver.solver.expression.discrete.arithmetic.IfArExpression
-
- All Implemented Interfaces:
ArExpression
public class IfArExpression extends Object implements ArExpression
Project: choco-solver.
- Since:
- 05/06/2018.
- 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 IfArExpression(ReExpression b, ArExpression y1, ArExpression y2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidextractVar(HashSet<IntVar> variables)Extract the variables from this expressionArExpression[]getExpressionChild()ModelgetModel()Return the associated modelintgetNoChild()intieval(int[] values, Map<IntVar,Integer> map)IntVarintVar()StringtoString()
-
-
-
Constructor Detail
-
IfArExpression
public IfArExpression(ReExpression b, ArExpression y1, ArExpression y2)
-
-
Method Detail
-
getModel
public Model getModel()
Description copied from interface:ArExpressionReturn the associated model- Specified by:
getModelin interfaceArExpression- Returns:
- a Model object
-
intVar
public IntVar intVar()
- Specified by:
intVarin interfaceArExpression- Returns:
- the arithmetic expression as an
IntVar. If necessary, it creates intermediary variable and posts intermediary constraints
-
extractVar
public void extractVar(HashSet<IntVar> variables)
Description copied from interface:ArExpressionExtract the variables from this expression- Specified by:
extractVarin interfaceArExpression- Parameters:
variables- set of variables
-
ieval
public int ieval(int[] values, Map<IntVar,Integer> map)- Specified by:
ievalin 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:
getNoChildin interfaceArExpression- Returns:
- the child of this expression, or null if thid
-
getExpressionChild
public ArExpression[] getExpressionChild()
- Specified by:
getExpressionChildin interfaceArExpression- Returns:
- the child of this expression, or null if thid
-
-