V - type of vertexE - type of edgepublic class CharikarDensestSubgraph<V,E> extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected org.jgrapht.graph.UndirectedSubgraph<V,E> | bestSubGraph | 
| protected org.jgrapht.UndirectedGraph<V,E> | graph | 
| protected org.jgrapht.util.FibonacciHeap<V> | heap | 
| Constructor and Description | 
|---|
| CharikarDensestSubgraph(org.jgrapht.UndirectedGraph<V,E> graph)Compute the densest subgraph of a graph. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | calculateDensestSubgraph() | 
| static double | calculateDensity(org.jgrapht.Graph<?,?> g)Calculate the density of the graph as the
 number of edges divided by the number of vertices | 
| org.jgrapht.graph.UndirectedSubgraph<V,E> | getDensestSubgraph() | 
| protected V | getMinDegreeVertex(org.jgrapht.UndirectedGraph<V,E> graph) | 
| protected V | getMinDegreeVertexBruteForce(org.jgrapht.UndirectedGraph<V,E> graph) | 
protected org.jgrapht.graph.UndirectedSubgraph<V,E> bestSubGraph
public CharikarDensestSubgraph(org.jgrapht.UndirectedGraph<V,E> graph)
graph - the graph.protected V getMinDegreeVertexBruteForce(org.jgrapht.UndirectedGraph<V,E> graph)
protected V getMinDegreeVertex(org.jgrapht.UndirectedGraph<V,E> graph)
protected void calculateDensestSubgraph()
public static double calculateDensity(org.jgrapht.Graph<?,?> g)
g - the graphpublic org.jgrapht.graph.UndirectedSubgraph<V,E> getDensestSubgraph()