- All Known Implementing Classes:
DeltaCPIntVarImpl
Object that allows to retrieve
in a constraint the changes of the domain
of a variable from one call to the
Constraint.propagate
to the next.
This is also called the delta set.
This functionality is useful to implement
incremental filtering algorithm in some global constraints
that rely on the changes of the domains.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanchanged()Tells if the domain has changed since previous call to Constraint#propagateintfillArray(int[] values) Fill the prefix of the array with the values in the delta set.iterator()An iterator on the delta set This iterator is not computed lazilybooleanTells if the maximum has changed in the domain since previous call to Constraint#propagatebooleanTells if the minimum has changed in the domain since previous call to Constraint#propagateintoldMax()The old max of the domain in previous call to Constraint#propagateintoldMin()The old min of the domain in previous call to Constraint#propagateintoldSize()The old size of the domain in previous call to Constraint#propagateintsize()The size of the delta set since previous call to Constraint#propagatevariable()The variable related to this delta setMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
variable
CPIntVar variable()The variable related to this delta set- Returns:
- the variable related to this delta set
-
oldMin
int oldMin()The old min of the domain in previous call to Constraint#propagate- Returns:
- the previous minimum
-
oldMax
int oldMax()The old max of the domain in previous call to Constraint#propagate- Returns:
- the previous maximum of the domain
-
oldSize
int oldSize()The old size of the domain in previous call to Constraint#propagate- Returns:
- the previous size of the domain
-
changed
boolean changed()Tells if the domain has changed since previous call to Constraint#propagate- Returns:
- if the domain has changed
-
size
int size()The size of the delta set since previous call to Constraint#propagate- Returns:
- the size of the delta set
-
minChanged
boolean minChanged()Tells if the minimum has changed in the domain since previous call to Constraint#propagate- Returns:
-
maxChanged
boolean maxChanged()Tells if the maximum has changed in the domain since previous call to Constraint#propagate- Returns:
-
iterator
An iterator on the delta set This iterator is not computed lazily -
fillArray
int fillArray(int[] values) Fill the prefix of the array with the values in the delta set.- Parameters:
values- the array to fill, its size should be large enough that is at least oldSize-current domain size.- Returns:
- the size of the prefix that contains the delta set
-