Class ArrayEventStore


  • public class ArrayEventStore
    extends Object
    A data structure which stores events during search, for lazy explanation purpose. Created by cprudhom on 13/11/14. Project: choco.
    Since:
    13/11/14
    Author:
    Charles Prud'homme
    • Constructor Detail

      • ArrayEventStore

        public ArrayEventStore​(IEnvironment env)
        Create an event store
        Parameters:
        env - backtracking environment
    • Method Detail

      • pushEvent

        public void pushEvent​(IntVar var,
                              ICause cause,
                              IEventType mask,
                              int one,
                              int two,
                              int three)
        Push an event on the top of this store
        Parameters:
        var - modified variable
        cause - cause of the modification
        mask - modification mask
        one - an int
        two - an int
        three - an int
      • forgetLast

        public void forgetLast()
        Forget the last event pushed
      • getSize

        public int getSize()
        Returns:
        number of events stored in this
      • getVariable

        public IntVar getVariable​(int evt)
        Parameters:
        evt - event index
        Returns:
        the variable associated to the event in position evt
      • getEventType

        public IEventType getEventType​(int evt)
        Parameters:
        evt - event index
        Returns:
        the event type associated to the event in position evt
      • getCause

        public ICause getCause​(int evt)
        Parameters:
        evt - event index
        Returns:
        the cause associated to the event in position evt
      • getFirstValue

        public int getFirstValue​(int evt)
        Parameters:
        evt - event index
        Returns:
        the first integer associated to the event in position evt
      • getSecondValue

        public int getSecondValue​(int evt)
        Parameters:
        evt - event index
        Returns:
        the second associated to the event in position evt
      • getThirdValue

        public int getThirdValue​(int evt)
        Parameters:
        evt - event index
        Returns:
        the third associated to the event in position evt