Class Pes


  • public class Pes
    extends java.lang.Object
    A model PrimeEventStructure of Pes with nodes and arcs
    Author:
    Robert Bergenthum, Raphael Meyer
    • Constructor Summary

      Constructors 
      Constructor Description
      Pes()
      Default Constructor sets nodes and arcs with empty ArrayLists
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addArc​(PesNode n1, PesNode n2)
      Add an Arc to Pes between two nodes
      void crop()
      function to initialize the crop the pre work to check if nodes are fusible
      void crop​(PesNode initialNode)
      actual crop function; fusible of nodes Attention: it removes elements from this.nodes which could end in an java.util.ConcurrentModificationException.
      java.util.ArrayList<PesArc> getArcs()  
      java.util.ArrayList<PesNode> getNodes()  
      PrimeEventStructure getPrime()  
      void printPes()
      Output of Pes() usefull for debug and statistics
      void setArcs​(java.util.ArrayList<PesArc> arcs)  
      void setNodes​(java.util.ArrayList<PesNode> nodes)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Pes

        public Pes()
        Default Constructor sets nodes and arcs with empty ArrayLists
    • Method Detail

      • addArc

        public void addArc​(PesNode n1,
                           PesNode n2)
        Add an Arc to Pes between two nodes
        Parameters:
        n1 - the first node
        n2 - the second node
      • printPes

        public void printPes()
        Output of Pes() usefull for debug and statistics
      • crop

        public void crop()
        function to initialize the crop the pre work to check if nodes are fusible
      • crop

        public void crop​(PesNode initialNode)
        actual crop function; fusible of nodes Attention: it removes elements from this.nodes which could end in an java.util.ConcurrentModificationException. So dont iterate through this.nodes and remove from it. Also we have a copy of postnodes to iterate in this method.
        Parameters:
        initialNode - is a node which should be cropped
      • getNodes

        public java.util.ArrayList<PesNode> getNodes()
        Returns:
        the nodes of the Pes
      • setNodes

        public void setNodes​(java.util.ArrayList<PesNode> nodes)
        Parameters:
        nodes - set the nodes Pes
      • getArcs

        public java.util.ArrayList<PesArc> getArcs()
        Returns:
        the arcs of Pes
      • setArcs

        public void setArcs​(java.util.ArrayList<PesArc> arcs)
        Parameters:
        arcs - set the arcs of Pes