Class IntervalDelta

  • All Implemented Interfaces:
    IDelta, IIntervalDelta, IntDelta

    public final class IntervalDelta
    extends TimeStampedObject
    implements IIntervalDelta
    A class to store the removed intervals of an integer variable.

    It defines methods to add a value, clear the structure and execute a Procedure for each value stored.

    • Constructor Detail

      • IntervalDelta

        public IntervalDelta​(IEnvironment environment)
    • Method Detail

      • lazyClear

        public void lazyClear()
        Description copied from interface: IDelta
        Lazy clear the delta, on world change
        Specified by:
        lazyClear in interface IDelta
      • add

        public void add​(int lb,
                        int ub,
                        ICause cause)
        Description copied from interface: IIntervalDelta
        Adds a new value interval to the delta
        Specified by:
        add in interface IIntervalDelta
        Parameters:
        lb - lower bound of removed interval
        ub - upper bound of removed interval
        cause - of the removal
      • getLB

        public int getLB​(int idx)
        Description copied from interface: IIntervalDelta
        Return the lower bound of idx^th interval stored in the delta, if any
        Specified by:
        getLB in interface IIntervalDelta
        Parameters:
        idx - rank of the interval
        Returns:
        idx^th interval
      • getUB

        public int getUB​(int idx)
        Description copied from interface: IIntervalDelta
        Return the upper bound idx^th interval stored in the delta, if any
        Specified by:
        getUB in interface IIntervalDelta
        Parameters:
        idx - rank of the interval
        Returns:
        idx^th interval
      • getCause

        public ICause getCause​(int idx)
        Description copied from interface: IntDelta
        Return the cause of the idx^th cause stored in the delta, if any
        Specified by:
        getCause in interface IntDelta
        Parameters:
        idx - rank of the interval
        Returns:
        cause of the removal
      • size

        public int size()
        Description copied from interface: IntDelta
        Returns the number of element
        Specified by:
        size in interface IntDelta
        Returns:
        number of element