class RMatGraph extends GraphGeneratorBase<LongValue, NullValue, NullValue> {

	@Override
	public Graph<LongValue, NullValue, NullValue> generate() {
		int scale = Long.SIZE - Long.numberOfLeadingZeros(vertexCount - 1);

		// Edges
		int cyclesPerEdge = noiseEnabled ? 5 * scale : scale;

		List<BlockInfo<T>> generatorBlocks = randomGenerableFactory
			.getRandomGenerables(edgeCount, cyclesPerEdge);

		DataSet<Edge<LongValue, NullValue>> edges = env
			.fromCollection(generatorBlocks)
				.name("Random generators")
			.rebalance()
				.setParallelism(parallelism)
				.name("Rebalance")
			.flatMap(new GenerateEdges<>(vertexCount, scale, a, b, c, noiseEnabled, noise))
				.setParallelism(parallelism)
				.name("RMat graph edges");

		// Vertices
		DataSet<Vertex<LongValue, NullValue>> vertices = GraphGeneratorUtils.vertexSet(edges, parallelism);

		// Graph
		return Graph.fromDataSet(vertices, edges, env);
	}

	public  RMatGraph(ExecutionEnvironment env, RandomGenerableFactory<T> randomGeneratorFactory, long vertexCount, long edgeCount);

}