java.lang.Object
org.maxicp.cp.engine.core.DeltaCPIntVarImpl
- All Implemented Interfaces:
Iterable<Integer>,Delta,DeltaCPIntVar
-
Constructor Summary
Constructors -
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#propagatevoidupdate()variable()The variable related to this delta setMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DeltaCPIntVarImpl
-
-
Method Details
-
variable
Description copied from interface:DeltaCPIntVarThe variable related to this delta set- Specified by:
variablein interfaceDeltaCPIntVar- Returns:
- the variable related to this delta set
-
oldMin
public int oldMin()Description copied from interface:DeltaCPIntVarThe old min of the domain in previous call to Constraint#propagate- Specified by:
oldMinin interfaceDeltaCPIntVar- Returns:
- the previous minimum
-
oldMax
public int oldMax()Description copied from interface:DeltaCPIntVarThe old max of the domain in previous call to Constraint#propagate- Specified by:
oldMaxin interfaceDeltaCPIntVar- Returns:
- the previous maximum of the domain
-
oldSize
public int oldSize()Description copied from interface:DeltaCPIntVarThe old size of the domain in previous call to Constraint#propagate- Specified by:
oldSizein interfaceDeltaCPIntVar- Returns:
- the previous size of the domain
-
changed
public boolean changed()Description copied from interface:DeltaCPIntVarTells if the domain has changed since previous call to Constraint#propagate- Specified by:
changedin interfaceDeltaCPIntVar- Returns:
- if the domain has changed
-
minChanged
public boolean minChanged()Description copied from interface:DeltaCPIntVarTells if the minimum has changed in the domain since previous call to Constraint#propagate- Specified by:
minChangedin interfaceDeltaCPIntVar- Returns:
-
maxChanged
public boolean maxChanged()Description copied from interface:DeltaCPIntVarTells if the maximum has changed in the domain since previous call to Constraint#propagate- Specified by:
maxChangedin interfaceDeltaCPIntVar- Returns:
-
size
public int size()Description copied from interface:DeltaCPIntVarThe size of the delta set since previous call to Constraint#propagate- Specified by:
sizein interfaceDeltaCPIntVar- Returns:
- the size of the delta set
-
iterator
Description copied from interface:DeltaCPIntVarAn iterator on the delta set This iterator is not computed lazily- Specified by:
iteratorin interfaceDeltaCPIntVar- Specified by:
iteratorin interfaceIterable<Integer>- Returns:
- an iterator on the delta set
-
fillArray
public int fillArray(int[] values) Description copied from interface:DeltaCPIntVarFill the prefix of the array with the values in the delta set.- Specified by:
fillArrayin interfaceDeltaCPIntVar- 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
-
update
public void update()
-