Class PetriNetCopier
- java.lang.Object
-
- org.processmining.implicitplaceidentification.algorithms.util.PetriNetCopier
-
public class PetriNetCopier extends java.lang.ObjectThis class provides method to create and modify a deep copy of a Petri net. Furthermore, there are methods to translate places/nodes between the copy and the original net.
-
-
Constructor Summary
Constructors Constructor Description PetriNetCopier(org.processmining.models.graphbased.directed.petrinet.Petrinet petrinet)PetriNetCopier(org.processmining.models.graphbased.directed.petrinet.Petrinet petrinet, java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PetriNetCopiercolorPlaces(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.elements.Place> places)Colors the given places in the deep copy.org.processmining.models.graphbased.directed.petrinet.PetrinetgetDeepCopy()Returns the deep copy of the netorg.processmining.models.graphbased.directed.petrinet.PetrinetNodegetNodeInCopyForOriginalNode(org.processmining.models.graphbased.directed.petrinet.PetrinetNode node)Takes aPetrinetNodein the deep copy and returns the corresponding node of the original net.org.processmining.models.graphbased.directed.petrinet.elements.PlacegetPlaceInCopyForOriginalPlace(org.processmining.models.graphbased.directed.petrinet.elements.Place p)Returns the place in the copy for a place in the original net.org.processmining.models.graphbased.directed.petrinet.elements.PlacegetPlaceInOriginalNetForPlaceInCopy(org.processmining.models.graphbased.directed.petrinet.elements.Place p)Returns the place in the original net for a place in the deep copy.org.processmining.models.semantics.petrinet.MarkingoriginalToCopyMarking(org.processmining.models.semantics.petrinet.Marking m1)Takes aMarkingof the original net and returns the corresponding marking in the copy.PetriNetCopierremoveNodes(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.PetrinetNode> nodes)Removes the given nodes from the deep copy.
-
-
-
Method Detail
-
getDeepCopy
public org.processmining.models.graphbased.directed.petrinet.Petrinet getDeepCopy()
Returns the deep copy of the net- Returns:
- the deep copy of the net
-
originalToCopyMarking
public org.processmining.models.semantics.petrinet.Marking originalToCopyMarking(org.processmining.models.semantics.petrinet.Marking m1)
Takes aMarkingof the original net and returns the corresponding marking in the copy.- Parameters:
m1- the Marking of the original net- Returns:
- the marking of the deep copy
-
getNodeInCopyForOriginalNode
public org.processmining.models.graphbased.directed.petrinet.PetrinetNode getNodeInCopyForOriginalNode(org.processmining.models.graphbased.directed.petrinet.PetrinetNode node)
Takes aPetrinetNodein the deep copy and returns the corresponding node of the original net.- Parameters:
node- a node in the deep copy.- Returns:
- the node in the original net
-
getPlaceInCopyForOriginalPlace
public org.processmining.models.graphbased.directed.petrinet.elements.Place getPlaceInCopyForOriginalPlace(org.processmining.models.graphbased.directed.petrinet.elements.Place p)
Returns the place in the copy for a place in the original net.- Parameters:
p- a place from the original net- Returns:
- the place in the deep copy
-
getPlaceInOriginalNetForPlaceInCopy
public org.processmining.models.graphbased.directed.petrinet.elements.Place getPlaceInOriginalNetForPlaceInCopy(org.processmining.models.graphbased.directed.petrinet.elements.Place p)
Returns the place in the original net for a place in the deep copy.- Parameters:
p- a place in the deep copy- Returns:
- the place in the original net
-
removeNodes
public PetriNetCopier removeNodes(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.PetrinetNode> nodes)
Removes the given nodes from the deep copy.- Parameters:
nodes- of the original net to be removed in the deep copy- Returns:
- the
PetriNetCopierinstance
-
colorPlaces
public PetriNetCopier colorPlaces(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.elements.Place> places)
Colors the given places in the deep copy.- Parameters:
places- of the original net that should be colored in the deep copy- Returns:
- the
PetriNetCopierinstance
-
-