public class EdgeBetweennessClusterer<V,E>
extends java.lang.Object
implements org.apache.commons.collections4.Transformer<edu.uci.ics.jung.graph.Graph<V,E>,java.util.Set<java.util.Set<V>>>
Running time is: O(kmn) where k is the number of edges to remove, m is the total number of edges, and n is the total number of vertices. For very sparse graphs the running time is closer to O(kn^2) and for graphs with strong community structure, the complexity is even lower.
This algorithm is a slight modification of the algorithm discussed below in that the number of edges to be removed is parameterized.
Constructor and Description |
---|
EdgeBetweennessClusterer(int numEdgesToRemove)
Constructs a new clusterer for the specified graph.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<E> |
getEdgesRemoved()
Retrieves the list of all edges that were removed
(assuming extract(...) was previously called).
|
java.util.Set<java.util.Set<V>> |
transform(edu.uci.ics.jung.graph.Graph<V,E> graph)
Finds the set of clusters which have the strongest "community structure".
|
public EdgeBetweennessClusterer(int numEdgesToRemove)
numEdgesToRemove
- the number of edges to be progressively removed from the graphpublic java.util.Set<java.util.Set<V>> transform(edu.uci.ics.jung.graph.Graph<V,E> graph)
public java.util.List<E> getEdgesRemoved()