Class PHead

  • All Implemented Interfaces:
    nl.tue.astar.Head

    public class PHead
    extends java.lang.Object
    implements nl.tue.astar.Head
    The head is basically two vectors, one for the marking and one for the parikh vector.
    Author:
    bfvdonge
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  PHead.HashContainer  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int hashCode  
      protected nl.tue.astar.util.ShortShortMultiset marking  
      protected nl.tue.astar.util.ShortShortMultiset parikh  
      static nl.tue.storage.hashing.HashCodeProvider PROVIDER  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PHead​(nl.tue.astar.util.ShortShortMultiset marking, nl.tue.astar.util.ShortShortMultiset parikh, int hashCode)  
        PHead​(AbstractPDelegate<?> delegate, org.processmining.models.semantics.petrinet.Marking m, org.deckfour.xes.model.XTrace t)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected nl.tue.astar.util.ShortShortMultiset cloneAndUpdateMarking​(AbstractPDelegate<?> delegate, nl.tue.astar.util.ShortShortMultiset marking, short modelMove)  
      static int computeBitsForParikh​(short acts, short places)  
      protected PHead createHead​(nl.tue.astar.util.ShortShortMultiset marking, nl.tue.astar.util.ShortShortMultiset parikh, int hashCode)  
      boolean equals​(java.lang.Object o)  
      protected org.processmining.models.semantics.petrinet.Marking fromMultiSet​(AbstractPDelegate<?> delegate)  
      nl.tue.astar.util.ShortShortMultiset getMarking()  
      gnu.trove.list.TIntList getModelMoves​(nl.tue.astar.Record rec, nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d)
      get the model moves that are possible.
      PHead getNextHead​(nl.tue.astar.Record rec, nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d, int modelMove, int logMove, int activity)
      Produce the next head, given the moves.
      nl.tue.astar.util.ShortShortMultiset getParikhVector()  
      gnu.trove.list.TIntList getSynchronousMoves​(nl.tue.astar.Record rec, nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d, gnu.trove.list.TIntList enabled, int activity)
      get the synchronous moves that are possible on activity, given the current list of enabled modelMoves.
      int hashCode()  
      boolean isFinal​(nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d)
      checks if this head belongs to a final state;
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • PROVIDER

        public static nl.tue.storage.hashing.HashCodeProvider PROVIDER
      • marking

        protected final nl.tue.astar.util.ShortShortMultiset marking
      • parikh

        protected final nl.tue.astar.util.ShortShortMultiset parikh
      • hashCode

        protected int hashCode
    • Constructor Detail

      • PHead

        public PHead​(AbstractPDelegate<?> delegate,
                     org.processmining.models.semantics.petrinet.Marking m,
                     org.deckfour.xes.model.XTrace t)
      • PHead

        protected PHead​(nl.tue.astar.util.ShortShortMultiset marking,
                        nl.tue.astar.util.ShortShortMultiset parikh,
                        int hashCode)
    • Method Detail

      • computeBitsForParikh

        public static int computeBitsForParikh​(short acts,
                                               short places)
      • createHead

        protected PHead createHead​(nl.tue.astar.util.ShortShortMultiset marking,
                                   nl.tue.astar.util.ShortShortMultiset parikh,
                                   int hashCode)
      • getNextHead

        public PHead getNextHead​(nl.tue.astar.Record rec,
                                 nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d,
                                 int modelMove,
                                 int logMove,
                                 int activity)
        Description copied from interface: nl.tue.astar.Head
        Produce the next head, given the moves. If logMove == AStarThread.NOMOVE, then modelMove is an element of the TIntList returned by the last call to getModelMoves() and activity == AStarThread.NOMOVE. If modelMove == AStarThread.NOMOVE, then logMove is an index into the trace on which the AStarThread is working and activity is the corresponding activity. If logMove!=AStarThread.NOMOVE and modelMove != AStarThread.NOMOVE, then modelMove is an element of the TIntlist returned by the last call to getSynchronousMove, logMove is an index into the trace on which the AStarThread is working and activity is the corresponding activity.
        Specified by:
        getNextHead in interface nl.tue.astar.Head
        Returns:
      • cloneAndUpdateMarking

        protected nl.tue.astar.util.ShortShortMultiset cloneAndUpdateMarking​(AbstractPDelegate<?> delegate,
                                                                             nl.tue.astar.util.ShortShortMultiset marking,
                                                                             short modelMove)
      • getModelMoves

        public gnu.trove.list.TIntList getModelMoves​(nl.tue.astar.Record rec,
                                                     nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d)
        Description copied from interface: nl.tue.astar.Head
        get the model moves that are possible.
        Specified by:
        getModelMoves in interface nl.tue.astar.Head
        Returns:
      • getSynchronousMoves

        public gnu.trove.list.TIntList getSynchronousMoves​(nl.tue.astar.Record rec,
                                                           nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d,
                                                           gnu.trove.list.TIntList enabled,
                                                           int activity)
        Description copied from interface: nl.tue.astar.Head
        get the synchronous moves that are possible on activity, given the current list of enabled modelMoves. The list enabled is obtained through a previous call to getModelMoves and implementations may only remove elements, i.e. the implementation may decide to remove modelMoves based on the available synchronous moves.
        Specified by:
        getSynchronousMoves in interface nl.tue.astar.Head
        enabled - TODO
        Returns:
      • isFinal

        public boolean isFinal​(nl.tue.astar.Delegate<? extends nl.tue.astar.Head,​? extends nl.tue.astar.Tail> d)
        Description copied from interface: nl.tue.astar.Head
        checks if this head belongs to a final state;
        Specified by:
        isFinal in interface nl.tue.astar.Head
        Returns:
      • fromMultiSet

        protected org.processmining.models.semantics.petrinet.Marking fromMultiSet​(AbstractPDelegate<?> delegate)
      • getMarking

        public nl.tue.astar.util.ShortShortMultiset getMarking()
      • getParikhVector

        public nl.tue.astar.util.ShortShortMultiset getParikhVector()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object