| Constructor and Description |
|---|
IntVarViewOffset(IntVar x,
int offset) |
| Modifier and Type | Method and Description |
|---|---|
void |
assign(int v)
Assigns the specified value
|
boolean |
contains(int v)
Returns true if the domain contains the specified value.
|
int |
fillArray(int[] dest)
Copies the values of the domain into an array.
|
Solver |
getSolver()
Returns the solver in which this variable was created.
|
boolean |
isBound()
Returns true if the domain of the variable has a single value.
|
int |
max()
Returns the maximum of the domain of the variable
|
int |
min()
Returns the minimum of the domain of the variable
|
void |
propagateOnBind(Constraint c)
Asks that
Constraint.propagate() is called whenever the domain
of this variable is reduced to a singleton. |
void |
propagateOnBoundChange(Constraint c)
Asks that
Constraint.propagate() is called whenever the
bound (maximum or minimum values) of the domain
of this variable is changes. |
void |
propagateOnDomainChange(Constraint c)
Asks that
Constraint.propagate() is called whenever the domain
of this variable changes. |
void |
remove(int v)
Removes the specified value.
|
void |
removeAbove(int v)
Remove all the values above a given value
|
void |
removeBelow(int v)
Remove all the values less than a given value
|
int |
size()
Returns the size of the domain of the variable
|
String |
toString() |
void |
whenBind(Procedure f)
Asks that the closure is called whenever the domain
of this variable is reduced to a single setValue
|
void |
whenBoundsChange(Procedure f)
Asks that the closure is called whenever
the max or min setValue of the domain of this variable changes
|
void |
whenDomainChange(Procedure f)
Asks that the closure is called whenever the domain change
of this variable changes
|
public IntVarViewOffset(IntVar x, int offset)
public Solver getSolver()
IntVarpublic void whenBind(Procedure f)
IntVarpublic void whenBoundsChange(Procedure f)
IntVarwhenBoundsChange in interface IntVarf - the closurepublic void whenDomainChange(Procedure f)
IntVarwhenDomainChange in interface IntVarf - the closurepublic void propagateOnDomainChange(Constraint c)
IntVarConstraint.propagate() is called whenever the domain
of this variable changes.
We say that a change event occurs.propagateOnDomainChange in interface IntVarc - the constraint for which the Constraint.propagate()
method should be called on change events of this variable.public void propagateOnBind(Constraint c)
IntVarConstraint.propagate() is called whenever the domain
of this variable is reduced to a singleton.
In such a state the variable is bind and we say that a bind event occurs.propagateOnBind in interface IntVarc - the constraint for which the Constraint.propagate()
method should be called on bind events of this variable.public void propagateOnBoundChange(Constraint c)
IntVarConstraint.propagate() is called whenever the
bound (maximum or minimum values) of the domain
of this variable is changes.
We say that a bound change event occurs in this case.propagateOnBoundChange in interface IntVarc - the constraint for which the Constraint.propagate()
method should be called on bound change events of this variable.public int min()
IntVarpublic int max()
IntVarpublic int size()
IntVarpublic int fillArray(int[] dest)
IntVarpublic boolean isBound()
IntVarpublic boolean contains(int v)
IntVarpublic void remove(int v)
IntVarpublic void assign(int v)
IntVarpublic void removeBelow(int v)
IntVarremoveBelow in interface IntVarv - the value such that all the values less than v are removedpublic void removeAbove(int v)
IntVarremoveAbove in interface IntVarv - the value such that all the values larger than v are removedCopyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.