public class VariableUtils extends Object
Project: choco-solver.
Constructor and Description |
---|
VariableUtils() |
Modifier and Type | Method and Description |
---|---|
static int[] |
boundsForAddition(IntVar... vars) |
static double[] |
boundsForAddition(RealVar... vars) |
static double[] |
boundsForAtan2(RealVar x,
RealVar y) |
static int[] |
boundsForDivision(IntVar x,
IntVar y) |
static double[] |
boundsForDivision(RealVar x,
RealVar y) |
static int[] |
boundsForMaximum(IntVar... vars) |
static double[] |
boundsForMaximum(RealVar... vars) |
static int[] |
boundsForMinimum(IntVar... vars) |
static double[] |
boundsForMinimum(RealVar... vars) |
static int[] |
boundsForModulo(IntVar x,
IntVar y) |
static int[] |
boundsForMultiplication(IntVar x,
IntVar y) |
static double[] |
boundsForMultiplication(RealVar x,
RealVar y) |
static int[] |
boundsForPow(IntVar x,
IntVar y) |
static double[] |
boundsForPow(RealVar x,
RealVar y) |
static int[] |
boundsForScalar(IntVar[] vars,
int[] coeffs) |
static int[] |
boundsForSubstraction(IntVar x,
IntVar y) |
static double[] |
boundsForSubstraction(RealVar x,
RealVar y) |
static long |
domainCardinality(IntVar... vars) |
static boolean |
intersect(IntVar x,
IntVar y) |
static boolean |
isConstant(Variable var) |
static boolean |
isReal(Variable var) |
static boolean |
isView(Variable var) |
static double |
searchSpaceSize(IntVar[] vars)
Compute the search space size
|
static IntVar[] |
toIntVar(Model model,
int... values)
Transform an array of int to an array of fixed IntVar
|
public static int[] boundsForAddition(IntVar... vars)
vars
- array of variablespublic static int[] boundsForScalar(IntVar[] vars, int[] coeffs)
vars
- array of variablespublic static double[] boundsForAddition(RealVar... vars)
vars
- array of variablespublic static int[] boundsForSubstraction(IntVar x, IntVar y)
x
- a variabley
- a variablepublic static double[] boundsForSubstraction(RealVar x, RealVar y)
x
- a variabley
- a variablepublic static int[] boundsForMultiplication(IntVar x, IntVar y)
x
- a variabley
- a variablepublic static double[] boundsForMultiplication(RealVar x, RealVar y)
x
- a variabley
- a variablepublic static int[] boundsForDivision(IntVar x, IntVar y)
x
- a variabley
- a variablepublic static double[] boundsForDivision(RealVar x, RealVar y)
x
- a variabley
- a variablepublic static int[] boundsForModulo(IntVar x, IntVar y)
x
- a variabley
- a variablepublic static int[] boundsForPow(IntVar x, IntVar y)
x
- a variabley
- a variablepublic static double[] boundsForPow(RealVar x, RealVar y)
x
- a variabley
- a variablepublic static double[] boundsForAtan2(RealVar x, RealVar y)
x
- a variabley
- a variablepublic static int[] boundsForMinimum(IntVar... vars)
vars
- array of variablespublic static double[] boundsForMinimum(RealVar... vars)
vars
- array of variablespublic static int[] boundsForMaximum(IntVar... vars)
vars
- array of variablespublic static double[] boundsForMaximum(RealVar... vars)
vars
- array of variablespublic static long domainCardinality(IntVar... vars)
vars
- an array of variablesInteger.MAX_VALUE
if too large.public static double searchSpaceSize(IntVar[] vars)
public static boolean intersect(IntVar x, IntVar y)
x
- an int variabley
- another int variablepublic static IntVar[] toIntVar(Model model, int... values)
values
- array of intsmodel
- model to create IntVarpublic static boolean isConstant(Variable var)
var
- a variablepublic static boolean isView(Variable var)
var
- a variablepublic static boolean isReal(Variable var)
var
- a variableCopyright © 2018. All rights reserved.