Module org.chocosolver
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 void
extractVar(HashSet<IntVar> variables)
Extract the variables from this expressionArExpression[]
getExpressionChild()
Model
getModel()
Return the associated modelint
getNoChild()
int
ieval(int[] values, Map<IntVar,Integer> map)
IntVar
intVar()
String
toString()
-
-
-
Constructor Detail
-
IfArExpression
public IfArExpression(ReExpression b, ArExpression y1, ArExpression y2)
-
-
Method Detail
-
getModel
public Model getModel()
Description copied from interface:ArExpression
Return the associated model- Specified by:
getModel
in interfaceArExpression
- Returns:
- a Model object
-
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
-
extractVar
public void extractVar(HashSet<IntVar> variables)
Description copied from interface:ArExpression
Extract the variables from this expression- Specified by:
extractVar
in interfaceArExpression
- Parameters:
variables
- set of variables
-
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
-
-