Class CommunityGenerator.Builder
java.lang.Object
org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGenerator.AbstractGeneratorBuilder<CommunityGenerator.Builder>
org.apache.tinkerpop.gremlin.algorithm.generator.CommunityGenerator.Builder
- Enclosing class:
- CommunityGenerator
public static final class CommunityGenerator.Builder
extends AbstractGenerator.AbstractGeneratorBuilder<CommunityGenerator.Builder>
-
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGenerator.AbstractGeneratorBuilder
edgeProcessor, label, seedSupplier, vertexProcessor -
Method Summary
Modifier and TypeMethodDescriptioncommunityDistribution(Distribution community) Sets the distribution to be used to generate the sizes of communities.create()crossCommunityPercentage(double percentage) Sets the percentage of edges that cross a community, i.e.degreeDistribution(Distribution degree) Sets the distribution to be used to generate the out-degrees of vertices.expectedNumCommunities(int expectedNumCommunities) expectedNumEdges(int expectedNumEdges) verticesToGenerateEdgesFor(Iterable<Vertex> vertices) Methods inherited from class org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGenerator.AbstractGeneratorBuilder
edgeProcessor, label, seedGenerator, vertexProcessor
-
Method Details
-
verticesToGenerateEdgesFor
-
expectedNumCommunities
-
expectedNumEdges
-
communityDistribution
Sets the distribution to be used to generate the sizes of communities. -
degreeDistribution
Sets the distribution to be used to generate the out-degrees of vertices. -
crossCommunityPercentage
Sets the percentage of edges that cross a community, i.e. connect a vertex to a vertex in another community. The lower this value, the higher the modularity of the generated communities.- Parameters:
percentage- Percentage of community crossing edges. Must be in [0,1]
-
create
-