public class ExactFlowCommunity
extends java.lang.Object
Constructor and Description |
---|
ExactFlowCommunity(int cohesionThreshold)
Constructs and initializes the algorithm
|
Modifier and Type | Method and Description |
---|---|
java.util.Set |
extract(DirectedGraph graph,
java.util.Set rootSet)
Extracts the community according to the cohesion threshold
|
static java.util.Set |
extract(DirectedGraph graph,
java.util.Set rootSet,
int numIterations)
Implements the "ApproximateFlowCommunity" algorithm.
|
protected void |
initializeFlowGraph(DirectedGraph flowGraph,
Vertex source,
Vertex sink,
java.util.Set rootSet)
Initialize the flow graph
|
public ExactFlowCommunity(int cohesionThreshold)
cohesionThreshold
- a heuristic value that determines the
level of cohesion for the community to be extractedpublic java.util.Set extract(DirectedGraph graph, java.util.Set rootSet)
graph
- the original graphrootSet
- the set of nodes used to see the communitypublic static java.util.Set extract(DirectedGraph graph, java.util.Set rootSet, int numIterations)
graph
- the original graphrootSet
- the set of nodes used to see the communityprotected void initializeFlowGraph(DirectedGraph flowGraph, Vertex source, Vertex sink, java.util.Set rootSet)
flowGraph
- the flow graphsource
- the source nodesink
- the sink noderootSet
- the set of nodes used to seed the community