Class PartiallyOrderedTrace

  • All Implemented Interfaces:
    Trace

    public class PartiallyOrderedTrace
    extends AbstractTrace
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getEdgeCount()  
      gnu.trove.TIntCollection getNextEvents​(boolean[] executed)
      Returns a TIntCollection containing all events that are currently enabled, given a boolean array indicating which events have been executed so far.
      gnu.trove.TIntCollection getNextEvents​(BitMask bitMask)
      Returns a TIntCollection containing all events that are currently enabled, given a bitmask for a boolean
      int[] getPredecessors​(int index)
      returns the predecessors of the event at the given index.
      int hashCode()  
      boolean isEnabled​(int index, boolean[] executed)
      Returns true if and only if the event at the given index is enabled, given that those events for which executed is true have been executed.
      void setPredecessors​(int event, int... predecessors)
      sets the predecessors for the event at index event.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • predecessors

        protected final int[][] predecessors
      • edgeCount

        protected int edgeCount
    • Constructor Detail

      • PartiallyOrderedTrace

        public PartiallyOrderedTrace​(java.lang.String label,
                                     int numEvents)
      • PartiallyOrderedTrace

        public PartiallyOrderedTrace​(java.lang.String label,
                                     int[] activitySequence)
      • PartiallyOrderedTrace

        public PartiallyOrderedTrace​(java.lang.String label,
                                     int[] activitySequence,
                                     int[][] predecessors)
    • Method Detail

      • setPredecessors

        public void setPredecessors​(int event,
                                    int... predecessors)
        sets the predecessors for the event at index event. It is advisable to provide the predecessors in ascending order.
        Parameters:
        event -
        predecessors -
      • getPredecessors

        public int[] getPredecessors​(int index)
        returns the predecessors of the event at the given index.
        Parameters:
        event -
        Returns:
      • isEnabled

        public boolean isEnabled​(int index,
                                 boolean[] executed)
        Returns true if and only if the event at the given index is enabled, given that those events for which executed is true have been executed. More formally, returns true if and only if for all i in predecessors[index] holds that executed[i] == true and executed[i] == false This method checks the predecessors in descending order, if they are specified in ascending order.
        Parameters:
        index -
        executed -
        Returns:
      • getNextEvents

        public gnu.trove.TIntCollection getNextEvents​(boolean[] executed)
        Description copied from interface: Trace
        Returns a TIntCollection containing all events that are currently enabled, given a boolean array indicating which events have been executed so far.
        Specified by:
        getNextEvents in interface Trace
        Overrides:
        getNextEvents in class AbstractTrace
        Returns:
      • getNextEvents

        public gnu.trove.TIntCollection getNextEvents​(BitMask bitMask)
        Description copied from interface: Trace
        Returns a TIntCollection containing all events that are currently enabled, given a bitmask for a boolean
        Specified by:
        getNextEvents in interface Trace
        Overrides:
        getNextEvents in class AbstractTrace
        Returns:
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class AbstractTrace
      • getEdgeCount

        public int getEdgeCount()