Class NormalisedIntGraphImplQuadratic
- java.lang.Object
-
- org.processmining.plugins.inductiveminer2.helperclasses.normalised.NormalisedIntGraphImplQuadratic
-
- All Implemented Interfaces:
java.lang.Cloneable,NormalisedIntGraph
public class NormalisedIntGraphImplQuadratic extends java.lang.Object implements NormalisedIntGraph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classNormalisedIntGraphImplQuadratic.EdgeIterator
-
Constructor Summary
Constructors Constructor Description NormalisedIntGraphImplQuadratic()NormalisedIntGraphImplQuadratic(int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdge(int normalisedSource, int normalisedTarget, long weight)Adds an edge.NormalisedIntGraphImplQuadraticclone()booleancontainsEdge(int normalisedSource, int normalisedTarget)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 that have a weight greater than 0; The edges that are returned are indices.java.lang.Iterable<java.lang.Long>getEdgesOf(int normalisedNode)Return an iterable of edgeIndex containing all edges of which v is a source or a target.intgetEdgeSourceIndex(long edgeIndex)Returns the vertex the edgeIndex comes from.intgetEdgeTargetIndex(long edgeIndex)Returns the index of the vertex the edgeIndex points to.longgetEdgeWeight(int normalisedSource, int normalisedTarget)Returns the weight of an edge between source and target.longgetEdgeWeight(long edgeIndex)Returns the weight of an edge.EdgeIterablegetIncomingEdgesOf(int normalisedNode)Returns an array of edge index, containing all edges of which v is the target.EdgeIterablegetOutgoingEdgesOf(int normalisedNode)Returns an array of edge index, containing all edges of which v is the source.longgetWeightOfHeaviestEdge()Returns the weight of the edge with the highest weight.java.lang.StringtoString()
-
-
-
Method Detail
-
addEdge
public void addEdge(int normalisedSource, int normalisedTarget, long weight)Description copied from interface:NormalisedIntGraphAdds an edge. If the weight becomes 0, the edge is removed.- Specified by:
addEdgein interfaceNormalisedIntGraph
-
getEdges
public java.lang.Iterable<java.lang.Long> getEdges()
Gives an iterable that iterates over all edges that have a weight greater than 0; The edges that are returned are indices.- Specified by:
getEdgesin interfaceNormalisedIntGraph- Returns:
-
containsEdge
public boolean containsEdge(int normalisedSource, int normalisedTarget)Returns whether the graph contains an edge between source and target.- Specified by:
containsEdgein interfaceNormalisedIntGraph- Returns:
-
getEdgeSourceIndex
public int getEdgeSourceIndex(long edgeIndex)
Description copied from interface:NormalisedIntGraphReturns the vertex the edgeIndex comes from.- Specified by:
getEdgeSourceIndexin interfaceNormalisedIntGraph- Returns:
-
getEdgeTargetIndex
public int getEdgeTargetIndex(long edgeIndex)
Description copied from interface:NormalisedIntGraphReturns the index of the vertex the edgeIndex points to.- Specified by:
getEdgeTargetIndexin interfaceNormalisedIntGraph- Returns:
-
getEdgeWeight
public long getEdgeWeight(long edgeIndex)
Returns the weight of an edge.- Specified by:
getEdgeWeightin interfaceNormalisedIntGraph- Parameters:
edgeIndex-- Returns:
-
getEdgeWeight
public long getEdgeWeight(int normalisedSource, int normalisedTarget)Description copied from interface:NormalisedIntGraphReturns the weight of an edge between source and target.- Specified by:
getEdgeWeightin interfaceNormalisedIntGraph- Returns:
-
getIncomingEdgesOf
public EdgeIterable getIncomingEdgesOf(int normalisedNode)
Description copied from interface:NormalisedIntGraphReturns an array of edge index, containing all edges of which v is the target. Notice that the edge weight might be 0.- Specified by:
getIncomingEdgesOfin interfaceNormalisedIntGraph- Returns:
-
getOutgoingEdgesOf
public EdgeIterable getOutgoingEdgesOf(int normalisedNode)
Description copied from interface:NormalisedIntGraphReturns an array of edge index, containing all edges of which v is the source. Notice that the edge weight might be 0.- Specified by:
getOutgoingEdgesOfin interfaceNormalisedIntGraph- Returns:
-
getEdgesOf
public java.lang.Iterable<java.lang.Long> getEdgesOf(int normalisedNode)
Description copied from interface:NormalisedIntGraphReturn an iterable of edgeIndex containing all edges of which v is a source or a target. Notice that the edge weight might be 0.- Specified by:
getEdgesOfin interfaceNormalisedIntGraph- Returns:
-
getWeightOfHeaviestEdge
public long getWeightOfHeaviestEdge()
Returns the weight of the edge with the highest weight.- Specified by:
getWeightOfHeaviestEdgein interfaceNormalisedIntGraph- Returns:
-
clone
public NormalisedIntGraphImplQuadratic clone()
- Specified by:
clonein interfaceNormalisedIntGraph- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-