public interface IViewFactory extends ISelf<Model>
Modifier and Type | Method and Description |
---|---|
default BoolVar |
boolNotView(BoolVar bool)
Creates a view over bool holding the logical negation of bool (ie, ¬BOOL).
|
static int |
checkDeclaredView(IntVar x,
int c,
Class clazz) |
default IntVar |
intAbsView(IntVar var)
Creates a view over var such that: |var|.
|
default IntVar |
intAffineView(int a,
IntVar x,
int b)
Creates an affine view over x such that: a.x + b.
|
default BoolVar |
intEqView(IntVar x,
int c)
Creates an view over x such that: (x = c) ⇔ b.
|
default BoolVar |
intGeView(IntVar x,
int c)
Creates an view over x such that: (x ≥ c) ⇔ b.
|
default BoolVar |
intLeView(IntVar x,
int c)
Creates an view over x such that: (x ≤ c) ⇔ b.
|
default IntVar |
intMinusView(IntVar var)
Creates a view over var equal to -var.
|
default BoolVar |
intNeView(IntVar x,
int c)
Creates an view over x such that: (x != c) ⇔ b.
|
default IntVar |
intOffsetView(IntVar var,
int cste)
Creates a view based on var, equal to var+cste.
|
default IntVar |
intScaleView(IntVar var,
int cste)
Creates a view over var equal to var*cste.
|
default RealVar |
realIntView(IntVar var,
double precision)
Creates a real view of var, i.e.
|
default RealVar[] |
realIntViewArray(IntVar[] ints,
double precision)
Creates an array of real views for a set of integer variables
This should be used to include an integer variable in an expression/constraint requiring RealVar
|
default RealVar[][] |
realIntViewMatrix(IntVar[][] ints,
double precision)
Creates a matrix of real views for a matrix of integer variables
This should be used to include an integer variable in an expression/constraint requiring RealVar
|
default BoolVar boolNotView(BoolVar bool)
bool
- a boolean variable.default IntVar intOffsetView(IntVar var, int cste)
var
- an integer variablecste
- a constant (can be either negative or positive)default IntVar intMinusView(IntVar var)
var
- an integer variabledefault IntVar intScaleView(IntVar var, int cste)
- if cste < -1, throws an exception;
- if cste = -1, returns a minus view;
- if cste = 0, returns a fixed variable;
- if cste = 1, returns var;
- otherwise, returns a scale view;
var
- an integer variablecste
- a constant.default IntVar intAbsView(IntVar var)
- if var is already instantiated, returns a fixed variable;
- if the lower bound of var is greater or equal to 0, returns var;
- if the upper bound of var is less or equal to 0, return a minus view;
- otherwise, returns an absolute view;
var
- an integer variable.default IntVar intAffineView(int a, IntVar x, int b)
a
- a coefficientx
- an integer variable.b
- a constantdefault BoolVar intEqView(IntVar x, int c)
x
- an integer variable.c
- a constantdefault BoolVar intNeView(IntVar x, int c)
x
- an integer variable.c
- a constantdefault BoolVar intLeView(IntVar x, int c)
x
- an integer variable.c
- a constantdefault BoolVar intGeView(IntVar x, int c)
x
- an integer variable.c
- a constantdefault RealVar realIntView(IntVar var, double precision)
var
- the integer variable to be viewed as a RealVarprecision
- double precision (e.g., 0.00001d)default RealVar[] realIntViewArray(IntVar[] ints, double precision)
ints
- the array of integer variables to be viewed as real variablesprecision
- double precision (e.g., 0.00001d)default RealVar[][] realIntViewMatrix(IntVar[][] ints, double precision)
ints
- the matrix of integer variables to be viewed as real variablesprecision
- double precision (e.g., 0.00001d)Copyright © 2018. All rights reserved.