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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommunityGenerator.Builder
communityDistribution(Distribution community)
Sets the distribution to be used to generate the sizes of communities.CommunityGenerator
create()
CommunityGenerator.Builder
crossCommunityPercentage(double percentage)
Sets the percentage of edges that cross a community, i.e.CommunityGenerator.Builder
degreeDistribution(Distribution degree)
Sets the distribution to be used to generate the out-degrees of vertices.CommunityGenerator.Builder
expectedNumCommunities(int expectedNumCommunities)
CommunityGenerator.Builder
expectedNumEdges(int expectedNumEdges)
CommunityGenerator.Builder
verticesToGenerateEdgesFor(Iterable<Vertex> vertices)
-
Methods inherited from class org.apache.tinkerpop.gremlin.algorithm.generator.AbstractGenerator.AbstractGeneratorBuilder
edgeProcessor, label, seedGenerator, vertexProcessor
-
-
-
-
Method Detail
-
verticesToGenerateEdgesFor
public CommunityGenerator.Builder verticesToGenerateEdgesFor(Iterable<Vertex> vertices)
-
expectedNumCommunities
public CommunityGenerator.Builder expectedNumCommunities(int expectedNumCommunities)
-
expectedNumEdges
public CommunityGenerator.Builder expectedNumEdges(int expectedNumEdges)
-
communityDistribution
public CommunityGenerator.Builder communityDistribution(Distribution community)
Sets the distribution to be used to generate the sizes of communities.
-
degreeDistribution
public CommunityGenerator.Builder degreeDistribution(Distribution degree)
Sets the distribution to be used to generate the out-degrees of vertices.
-
crossCommunityPercentage
public CommunityGenerator.Builder crossCommunityPercentage(double percentage)
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
public CommunityGenerator create()
-
-