Interface DirectlyFollowsModel
-
- All Known Implementing Classes:
DirectlyFollowsModelImplQuadratic
public interface DirectlyFollowsModel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEdge(int sourceIndex, int targetIndex)Adds an edge.voidaddEndNode(int nodeIndex)Has no effect if the activity was already an end node.intaddNode(java.lang.String nodeName)Inserts an activity.voidaddNodes(java.lang.String[] nodeNames)Adds an array of nodes with the provided names.voidaddStartNode(int nodeIndex)Has no effect if the activity was already a start node.DirectlyFollowsModelclone()booleancontainsEdge(int sourceIndex, int targetIndex)Returns whether the graph contains an edge between source and target.booleanequals(DirectlyFollowsModel other)This method considers graphs equal when they are the same and the activities were added in the same order.java.lang.String[]getAllNodeNames()java.lang.Iterable<java.lang.Long>getEdges()Gives an iterable that iterates over all edges; The edges that are returned are indices.intgetEdgeSource(long edgeIndex)Returns the node the edgeIndex comes from.intgetEdgeTarget(long edgeIndex)Returns the node the edgeIndex points to.gnu.trove.set.TIntSetgetEndNodes()gnu.trove.set.TIntSetgetIndicesOfNodeName(java.lang.String nodeName)java.lang.Iterable<java.lang.Integer>getNodeIndices()java.lang.StringgetNodeOfIndex(int value)intgetNumberOfEndNodes()intgetNumberOfNodes()intgetNumberOfStartNodes()gnu.trove.set.TIntSetgetStartNodes()booleanhasEndNodes()inthashCode()booleanhasStartNodes()booleanisEmptyTraces()voidremoveEdge(int sourceIndex, int targetIndex)Removes an edge.voidsetEmptyTraces(boolean emptyTraces)Set whether the model supports empty (epsilon) traces.
-
-
-
Method Detail
-
getNodeOfIndex
java.lang.String getNodeOfIndex(int value)
- Parameters:
value-- Returns:
- The activity, or null if it does not exist.
-
getNumberOfNodes
int getNumberOfNodes()
- Returns:
- The number of nodes in the model.
-
getAllNodeNames
java.lang.String[] getAllNodeNames()
- Returns:
- The added node names, in the order they were added.
-
getNodeIndices
java.lang.Iterable<java.lang.Integer> getNodeIndices()
-
getIndicesOfNodeName
gnu.trove.set.TIntSet getIndicesOfNodeName(java.lang.String nodeName)
- Parameters:
nodeName-- Returns:
- The indices of the nodeName.
-
addNode
int addNode(java.lang.String nodeName)
Inserts an activity.- Parameters:
nodeName-- Returns:
- the index of the newly added node.
-
addNodes
void addNodes(java.lang.String[] nodeNames)
Adds an array of nodes with the provided names. Typically more efficient than adding the nodes one-by-one.- Parameters:
nodeNames-
-
isEmptyTraces
boolean isEmptyTraces()
- Returns:
- Whether the model supports empty (epsilon) traces.
-
setEmptyTraces
void setEmptyTraces(boolean emptyTraces)
Set whether the model supports empty (epsilon) traces.- Parameters:
emptyTraces-
-
addEdge
void addEdge(int sourceIndex, int targetIndex)Adds an edge. Has no effect if the edge was already present.- Parameters:
sourceIndex-targetIndex-
-
removeEdge
void removeEdge(int sourceIndex, int targetIndex)Removes an edge. Has no effect if the edge was not present.- Parameters:
sourceIndex-targetIndex-
-
getEdges
java.lang.Iterable<java.lang.Long> getEdges()
Gives an iterable that iterates over all edges; The edges that are returned are indices. The iterable supports remove() calls, however calls to this method might invalidate other iterables.- Returns:
-
containsEdge
boolean containsEdge(int sourceIndex, int targetIndex)Returns whether the graph contains an edge between source and target.- Parameters:
sourceIndex-targetIndex-- Returns:
-
getEdgeSource
int getEdgeSource(long edgeIndex)
Returns the node the edgeIndex comes from.- Parameters:
edgeIndex-- Returns:
-
getEdgeTarget
int getEdgeTarget(long edgeIndex)
Returns the node the edgeIndex points to.- Parameters:
edgeIndex-- Returns:
-
hasStartNodes
boolean hasStartNodes()
-
addStartNode
void addStartNode(int nodeIndex)
Has no effect if the activity was already a start node.- Parameters:
nodeIndex-
-
getStartNodes
gnu.trove.set.TIntSet getStartNodes()
-
getNumberOfStartNodes
int getNumberOfStartNodes()
-
hasEndNodes
boolean hasEndNodes()
-
addEndNode
void addEndNode(int nodeIndex)
Has no effect if the activity was already an end node.- Parameters:
nodeIndex-
-
getEndNodes
gnu.trove.set.TIntSet getEndNodes()
-
getNumberOfEndNodes
int getNumberOfEndNodes()
-
equals
boolean equals(DirectlyFollowsModel other)
This method considers graphs equal when they are the same and the activities were added in the same order.- Parameters:
other-- Returns:
-
hashCode
int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
clone
DirectlyFollowsModel clone()
-
-