Class CommunityGenerator
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGenerator
- 
- org.apache.tinkerpop.gremlin.algorithm.generator.CommunityGenerator
 
 
- 
- All Implemented Interfaces:
- Generator
 
 public class CommunityGenerator extends AbstractGenerator Generates a synthetic network with a community structure, that is, several densely connected sub-networks that are loosely connected with one another.- Author:
- Matthias Broecheler (me@matthiasb.com), Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classCommunityGenerator.Builder- 
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGeneratorAbstractGenerator.AbstractGeneratorBuilder<T extends AbstractGenerator.AbstractGeneratorBuilder>
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static doubleDEFAULT_CROSS_COMMUNITY_PERCENTAGEstatic intDEFAULT_NUMBER_OF_COMMUNITIES- 
Fields inherited from class org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGeneratorg, seedSupplier
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommunityGenerator.Builderbuild(Graph g)intgenerate()Generates a synthetic network for provided vertices in the given graph such that the provided expected number of communities are generated with the specified expected number of edges.- 
Methods inherited from class org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGeneratoraddEdge, processVertex
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_CROSS_COMMUNITY_PERCENTAGEpublic static final double DEFAULT_CROSS_COMMUNITY_PERCENTAGE - See Also:
- Constant Field Values
 
 - 
DEFAULT_NUMBER_OF_COMMUNITIESpublic static final int DEFAULT_NUMBER_OF_COMMUNITIES - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
generatepublic int generate() Generates a synthetic network for provided vertices in the given graph such that the provided expected number of communities are generated with the specified expected number of edges.- Returns:
- The actual number of edges generated. May be different from the expected number.
 
 - 
buildpublic static CommunityGenerator.Builder build(Graph g) 
 
- 
 
-