Class PTraceImp
- java.lang.Object
-
- edu.uci.ics.jung.graph.AbstractGraph<V,E>
-
- edu.uci.ics.jung.graph.AbstractTypedGraph<V,E>
-
- edu.uci.ics.jung.graph.DirectedSparseGraph<java.lang.Integer,PDependency>
-
- org.processmining.partialorder.ptrace.model.imp.PTraceImp
-
- All Implemented Interfaces:
edu.uci.ics.jung.graph.DirectedGraph<java.lang.Integer,PDependency>,edu.uci.ics.jung.graph.Graph<java.lang.Integer,PDependency>,edu.uci.ics.jung.graph.Hypergraph<java.lang.Integer,PDependency>,java.io.Serializable,java.lang.Iterable<org.deckfour.xes.model.XEvent>,PTrace
- Direct Known Subclasses:
PTraceExtendedAbstract
public class PTraceImp extends edu.uci.ics.jung.graph.DirectedSparseGraph<java.lang.Integer,PDependency> implements PTrace
A graphical data model of the partially ordered trace. Information stored in this class includes (1) the original linear trace, (2) the trace index in the log (3) a list of boolean indicating the event is a visible move (or not), and (4) a list of activity number according to the delegate. The class has functions to get a (un)sorted and (un)filtered potrace in PartiallyOrderedTrace for A* alignment- Author:
- xlu
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.deckfour.xes.model.XTracetraceprotected inttraceIndex
-
Constructor Summary
Constructors Constructor Description PTraceImp(org.deckfour.xes.model.XTrace trace, int traceIndex)Constructor to get a new PartiallyOrderedXTrace graph with empty nodes and edges
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddDependency(PDependency relation, int sourceEventIndex, int targetEventIndex)booleanaddEvent(int eventIndex)java.util.Collection<PDependency>getDependencies()PDependencygetDependency(int source, int target)java.util.Set<java.lang.Integer>getEndEventIndices()org.deckfour.xes.model.XEventgetEvent(int index)java.util.Collection<java.lang.Integer>getEventIndices()java.util.Collection<java.lang.Integer>getPredecessorIndices(int index)java.util.Set<java.lang.Integer>getStartEventIndices()java.util.Collection<java.lang.Integer>getSuccessorIndices(int index)org.deckfour.xes.model.XTracegetTrace()intgetTraceIndex()java.util.Iterator<org.deckfour.xes.model.XEvent>iterator()voidsetTraceIndex(int i)intsize()java.lang.StringtoString()-
Methods inherited from class edu.uci.ics.jung.graph.DirectedSparseGraph
addEdge, addVertex, containsEdge, containsVertex, findEdge, findEdgeSet, getDest, getEdgeCount, getEdges, getEndpoints, getFactory, getIncidentEdges, getIncoming_internal, getInEdges, getNeighbors, getOutEdges, getOutgoing_internal, getPredecessors, getPreds_internal, getSource, getSuccessors, getSuccs_internal, getVertexCount, getVertices, isDest, isSource, removeEdge, removeVertex
-
Methods inherited from class edu.uci.ics.jung.graph.AbstractTypedGraph
getDefaultEdgeType, getEdgeCount, getEdges, getEdgeType, hasEqualEdgeType, validateEdgeType
-
Methods inherited from class edu.uci.ics.jung.graph.AbstractGraph
addEdge, addEdge, addEdge, addEdge, addEdge, degree, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface edu.uci.ics.jung.graph.Graph
addEdge, addEdge, getOpposite, getPredecessorCount, getSuccessorCount, inDegree, isPredecessor, isSuccessor, outDegree
-
-
-
-
Constructor Detail
-
PTraceImp
public PTraceImp(org.deckfour.xes.model.XTrace trace, int traceIndex)Constructor to get a new PartiallyOrderedXTrace graph with empty nodes and edges- Parameters:
trace- The linear XTrace of this partially ordered tracetraceIndex- The index of the linear XTrace in the log
-
-
Method Detail
-
getDependency
public PDependency getDependency(int source, int target)
- Specified by:
getDependencyin interfacePTrace- Returns:
- A data relation between the two events, or null if there is no relation
-
getStartEventIndices
public java.util.Set<java.lang.Integer> getStartEventIndices()
- Specified by:
getStartEventIndicesin interfacePTrace- Returns:
- A set of indices of events that have no predecessors.
-
getEndEventIndices
public java.util.Set<java.lang.Integer> getEndEventIndices()
- Specified by:
getEndEventIndicesin interfacePTrace- Returns:
- A set of indices of event that have no successors.
-
getTrace
public org.deckfour.xes.model.XTrace getTrace()
-
getTraceIndex
public int getTraceIndex()
- Specified by:
getTraceIndexin interfacePTrace- Returns:
- The index of the linear trace in the log
-
setTraceIndex
public void setTraceIndex(int i)
- Specified by:
setTraceIndexin interfacePTrace
-
toString
public java.lang.String toString()
- Overrides:
toStringin classedu.uci.ics.jung.graph.AbstractGraph<java.lang.Integer,PDependency>
-
getEventIndices
public java.util.Collection<java.lang.Integer> getEventIndices()
- Specified by:
getEventIndicesin interfacePTrace
-
getDependencies
public java.util.Collection<PDependency> getDependencies()
- Specified by:
getDependenciesin interfacePTrace
-
addDependency
public boolean addDependency(PDependency relation, int sourceEventIndex, int targetEventIndex)
- Specified by:
addDependencyin interfacePTrace
-
getEvent
public org.deckfour.xes.model.XEvent getEvent(int index)
-
iterator
public java.util.Iterator<org.deckfour.xes.model.XEvent> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<org.deckfour.xes.model.XEvent>
-
getPredecessorIndices
public java.util.Collection<java.lang.Integer> getPredecessorIndices(int index)
- Specified by:
getPredecessorIndicesin interfacePTrace
-
getSuccessorIndices
public java.util.Collection<java.lang.Integer> getSuccessorIndices(int index)
- Specified by:
getSuccessorIndicesin interfacePTrace
-
-