public class CommunityGenerator extends AbstractGenerator
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_CROSS_COMMUNITY_PERCENTAGE
Default value used if
setCrossCommunityPercentage(double) is not called. |
| Constructor and Description |
|---|
CommunityGenerator(String label) |
CommunityGenerator(String label,
EdgeAnnotator annotator) |
CommunityGenerator(String label,
EdgeAnnotator edgeAnnotator,
VertexAnnotator vertexAnnotator) |
| Modifier and Type | Method and Description |
|---|---|
int |
generate(com.tinkerpop.blueprints.Graph graph,
int expectedNumCommunities,
int expectedNumEdges)
Generates a synthetic network for all vertices in the given graph such that the provided expected number
of communities are generated with the specified expected number of edges.
|
int |
generate(com.tinkerpop.blueprints.Graph graph,
Iterable<com.tinkerpop.blueprints.Vertex> vertices,
int expectedNumCommunities,
int expectedNumEdges)
Generates a synthetic network for provided vertices in the given graphh such that the provided expected number
of communities are generated with the specified expected number of edges.
|
double |
getCrossCommunityPercentage()
Returns the configured cross community percentage.
|
void |
setCommunityDistribution(Distribution community)
Sets the distribution to be used to generate the sizes of communities.
|
void |
setCrossCommunityPercentage(double percentage)
Sets the percentage of edges that cross a community, i.e.
|
void |
setDegreeDistribution(Distribution degree)
Sets the distribution to be used to generate the out-degrees of vertices
|
addEdge, getEdgeAnnotator, getLabel, getVertexAnnotator, processVertexpublic static final double DEFAULT_CROSS_COMMUNITY_PERCENTAGE
setCrossCommunityPercentage(double) is not called.public CommunityGenerator(String label, EdgeAnnotator annotator)
label - annotator - AbstractGenerator.AbstractGenerator(String, EdgeAnnotator)public CommunityGenerator(String label, EdgeAnnotator edgeAnnotator, VertexAnnotator vertexAnnotator)
label - edgeAnnotator - vertexAnnotator - AbstractGenerator.AbstractGenerator(String, EdgeAnnotator, VertexAnnotator)public CommunityGenerator(String label)
label - AbstractGenerator.AbstractGenerator(String)public void setCommunityDistribution(Distribution community)
community - public void setDegreeDistribution(Distribution degree)
degree - public void setCrossCommunityPercentage(double percentage)
percentage - Percentage of community crossing edges. Must be in [0,1]public double getCrossCommunityPercentage()
public int generate(com.tinkerpop.blueprints.Graph graph,
int expectedNumCommunities,
int expectedNumEdges)
graph - expectedNumCommunities - expectedNumEdges - public int generate(com.tinkerpop.blueprints.Graph graph,
Iterable<com.tinkerpop.blueprints.Vertex> vertices,
int expectedNumCommunities,
int expectedNumEdges)
graph - vertices - expectedNumCommunities - expectedNumEdges - Copyright © 2012–2016. All rights reserved.