Package jadex.tools.comanalyzer.graph
Class GraphEdgeBetweennessClusterer
- java.lang.Object
-
- jadex.tools.comanalyzer.graph.GraphEdgeBetweennessClusterer
-
- All Implemented Interfaces:
org.apache.commons.collections15.Transformer
public class GraphEdgeBetweennessClusterer extends java.lang.Object implements org.apache.commons.collections15.Transformer
An algorithm for computing clusters (community structure) in graphs based on edge betweenness. This is actualy a copy of the EdgeBetweennessClusterer in the jung frame work. There is a bug the function transfrom() in the original class and you cant subclass it, because all the relevant attributes are private without any getter methods :(
-
-
Constructor Summary
Constructors Constructor Description GraphEdgeBetweennessClusterer(int numEdgesToRemove)
Constructs a new clusterer for the specified graph.GraphEdgeBetweennessClusterer(int numEdgesToRemove, java.util.Map edgeWeights)
Constructs a new clusterer for the specified graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
getEdgesRemoved()
Retrieves the list of all edges that were removed (assuming extract(...) was previously called.java.lang.Object
transform(java.lang.Object graph)
Finds the set of clusters which have the strongest "community structure".
-
-
-
Constructor Detail
-
GraphEdgeBetweennessClusterer
public GraphEdgeBetweennessClusterer(int numEdgesToRemove)
Constructs a new clusterer for the specified graph.- Parameters:
numEdgesToRemove
- the number of edges to be progressively removed from the graph
-
GraphEdgeBetweennessClusterer
public GraphEdgeBetweennessClusterer(int numEdgesToRemove, java.util.Map edgeWeights)
Constructs a new clusterer for the specified graph.- Parameters:
numEdgesToRemove
- the number of edges to be progressively removed from the graphedgeWeights
- The map of edgeweights
-
-
Method Detail
-
transform
public java.lang.Object transform(java.lang.Object graph)
Finds the set of clusters which have the strongest "community structure". The more edges removed the smaller and more cohesive the clusters.- Specified by:
transform
in interfaceorg.apache.commons.collections15.Transformer
- Parameters:
g
- the graph
-
getEdgesRemoved
public java.util.List getEdgesRemoved()
Retrieves the list of all edges that were removed (assuming extract(...) was previously called. The edges returned are stored in order in which they were removed- Returns:
- the edges in the original graph
-
-