Class CommunityGenerator.Builder

Enclosing class:
CommunityGenerator

public static final class CommunityGenerator.Builder extends AbstractGenerator.AbstractGeneratorBuilder<CommunityGenerator.Builder>
  • Method Details

    • 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()