Interface IntGraph
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Implementing Classes:
IntGraphImplQuadratic
public interface IntGraph extends java.lang.Cloneable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEdge(int Source, int Target, long weight)Adds an edge.voidaddNode(int node)Adds a node to the graph.IntGraphclone()booleancontainsEdge(int source, int target)Returns whether the graph contains an edge between source and target.java.lang.Iterable<java.lang.Long>getEdges()Gives an iterable that iterates over all edges; The edges that are returned are indices.java.lang.Iterable<java.lang.Long>getEdgesOf(int node)Return an iterable of edgeIndex containing all edges of which v is a source or a target.intgetEdgeSource(long edgeIndex)Returns the node the edgeIndex comes from.intgetEdgeSourceIndex(long edgeIndex)intgetEdgeTarget(long edgeIndex)Returns the node the edgeIndex points to.intgetEdgeTargetIndex(long edgeIndex)Returns the index of the node the edgeIndex points to.longgetEdgeWeight(int Source, int Target)Returns the weight of an edge between source and target.longgetEdgeWeight(long edgeIndex)Returns the weight of an edge.java.lang.Iterable<java.lang.Long>getIncomingEdgesOf(int Node)Returns an array of edge index, containing all edges of which v is the target.org.processmining.plugins.InductiveMiner.graphs.EdgeIterablegetIncomingEdgesOfIndex(int v)intgetNodeOfIndex(int index)The graph keeps an index of nodes.int[]getNodes()intgetNumberOfNodes()java.lang.Iterable<java.lang.Long>getOutgoingEdgesOf(int Node)Returns an array of edge index, containing all edges of which v is the source.org.processmining.plugins.InductiveMiner.graphs.EdgeIterablegetOutgoingEdgesOfIndex(int v)longgetWeightOfHeaviestEdge()Returns the weight of the edge with the highest weight.
-
-
-
Method Detail
-
addNode
void addNode(int node)
Adds a node to the graph. Has no effect if the node was already present.- Parameters:
node-
-
getNodes
int[] getNodes()
- Returns:
- an array of the vertices in the graph.
-
addEdge
void addEdge(int Source, int Target, long weight)Adds an edge. If the weight becomes 0, the edge is removed.- Parameters:
Source-Target-weight-
-
getEdges
java.lang.Iterable<java.lang.Long> getEdges()
Gives an iterable that iterates over all edges; The edges that are returned are indices. Notice that the edge weight might NOT be 0.- Returns:
-
containsEdge
boolean containsEdge(int source, int target)Returns whether the graph contains an edge between source and target.- 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:
-
getEdgeTargetIndex
int getEdgeTargetIndex(long edgeIndex)
Returns the index of the node the edgeIndex points to.- Parameters:
edgeIndex-- Returns:
-
getEdgeWeight
long getEdgeWeight(int Source, int Target)Returns the weight of an edge between source and target.- Parameters:
Source-Target-- Returns:
-
getIncomingEdgesOf
java.lang.Iterable<java.lang.Long> getIncomingEdgesOf(int Node)
Returns an array of edge index, containing all edges of which v is the target. Notice that the edge weight might be 0.- Parameters:
Node-- Returns:
-
getOutgoingEdgesOf
java.lang.Iterable<java.lang.Long> getOutgoingEdgesOf(int Node)
Returns an array of edge index, containing all edges of which v is the source. Notice that the edge weight might be 0.- Parameters:
Node-- Returns:
-
getEdgesOf
java.lang.Iterable<java.lang.Long> getEdgesOf(int node)
Return an iterable of edgeIndex containing all edges of which v is a source or a target. Notice that the edge weight might be 0.- Parameters:
node-- Returns:
-
getWeightOfHeaviestEdge
long getWeightOfHeaviestEdge()
Returns the weight of the edge with the highest weight.- Returns:
-
getEdgeWeight
long getEdgeWeight(long edgeIndex)
Returns the weight of an edge.- Parameters:
edgeIndex-- Returns:
-
clone
IntGraph clone()
-
getNumberOfNodes
int getNumberOfNodes()
-
getNodeOfIndex
int getNodeOfIndex(int index)
The graph keeps an index of nodes. With this function, you can look up these indices.- Parameters:
index-- Returns:
-
getEdgeSourceIndex
int getEdgeSourceIndex(long edgeIndex)
-
getOutgoingEdgesOfIndex
org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getOutgoingEdgesOfIndex(int v)
-
getIncomingEdgesOfIndex
org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getIncomingEdgesOfIndex(int v)
-
-