Module org.maxicp

Class DeltaCPIntVarImpl

java.lang.Object
org.maxicp.cp.engine.core.DeltaCPIntVarImpl
All Implemented Interfaces:
Iterable<Integer>, Delta, DeltaCPIntVar

public class DeltaCPIntVarImpl extends Object implements DeltaCPIntVar
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tells if the domain has changed since previous call to Constraint#propagate
    int
    fillArray(int[] values)
    Fill the prefix of the array with the values in the delta set.
    An iterator on the delta set This iterator is not computed lazily
    boolean
    Tells if the maximum has changed in the domain since previous call to Constraint#propagate
    boolean
    Tells if the minimum has changed in the domain since previous call to Constraint#propagate
    int
    The old max of the domain in previous call to Constraint#propagate
    int
    The old min of the domain in previous call to Constraint#propagate
    int
    The old size of the domain in previous call to Constraint#propagate
    int
    The size of the delta set since previous call to Constraint#propagate
    void
     
    The variable related to this delta set

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • DeltaCPIntVarImpl

      public DeltaCPIntVarImpl(CPIntVar x)
  • Method Details

    • variable

      public CPIntVar variable()
      Description copied from interface: DeltaCPIntVar
      The variable related to this delta set
      Specified by:
      variable in interface DeltaCPIntVar
      Returns:
      the variable related to this delta set
    • oldMin

      public int oldMin()
      Description copied from interface: DeltaCPIntVar
      The old min of the domain in previous call to Constraint#propagate
      Specified by:
      oldMin in interface DeltaCPIntVar
      Returns:
      the previous minimum
    • oldMax

      public int oldMax()
      Description copied from interface: DeltaCPIntVar
      The old max of the domain in previous call to Constraint#propagate
      Specified by:
      oldMax in interface DeltaCPIntVar
      Returns:
      the previous maximum of the domain
    • oldSize

      public int oldSize()
      Description copied from interface: DeltaCPIntVar
      The old size of the domain in previous call to Constraint#propagate
      Specified by:
      oldSize in interface DeltaCPIntVar
      Returns:
      the previous size of the domain
    • changed

      public boolean changed()
      Description copied from interface: DeltaCPIntVar
      Tells if the domain has changed since previous call to Constraint#propagate
      Specified by:
      changed in interface DeltaCPIntVar
      Returns:
      if the domain has changed
    • minChanged

      public boolean minChanged()
      Description copied from interface: DeltaCPIntVar
      Tells if the minimum has changed in the domain since previous call to Constraint#propagate
      Specified by:
      minChanged in interface DeltaCPIntVar
      Returns:
    • maxChanged

      public boolean maxChanged()
      Description copied from interface: DeltaCPIntVar
      Tells if the maximum has changed in the domain since previous call to Constraint#propagate
      Specified by:
      maxChanged in interface DeltaCPIntVar
      Returns:
    • size

      public int size()
      Description copied from interface: DeltaCPIntVar
      The size of the delta set since previous call to Constraint#propagate
      Specified by:
      size in interface DeltaCPIntVar
      Returns:
      the size of the delta set
    • iterator

      public Iterator<Integer> iterator()
      Description copied from interface: DeltaCPIntVar
      An iterator on the delta set This iterator is not computed lazily
      Specified by:
      iterator in interface DeltaCPIntVar
      Specified by:
      iterator in interface Iterable<Integer>
      Returns:
      an iterator on the delta set
    • fillArray

      public int fillArray(int[] values)
      Description copied from interface: DeltaCPIntVar
      Fill the prefix of the array with the values in the delta set.
      Specified by:
      fillArray in interface DeltaCPIntVar
      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()
      Specified by:
      update in interface Delta