public DistributionGenerator create() {
            if (null == outDistribution)
                throw new IllegalStateException("Must set out-distribution before generating edges");
            final Distribution outDist = outDistribution.initialize(SizableIterable.sizeOf(out), expectedNumEdges);
            Distribution inDist;
            if (null == inDistribution) {
                if (out != in) throw new IllegalArgumentException("Need to specify in-distribution");
                inDist = new CopyDistribution();
            } else {
                inDist = inDistribution.initialize(SizableIterable.sizeOf(in), expectedNumEdges);
            }

            return new DistributionGenerator(this.g, this.label, this.edgeProcessor, this.vertexProcessor, this.seedSupplier,
                    this.out, this.in, this.expectedNumEdges, outDist, inDist, allowLoops);
        }
Sets the distribution to be used to generate the out-degrees of vertices.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/DistributionGenerator.java