T - the type of the RandomGeneratorpublic interface RandomGenerableFactory<T extends org.apache.commons.math3.random.RandomGenerator>
RandomGenerableFactory returns a scale-free collection of sources
of pseudorandomness which can be used to perform repeatable parallel
computation regardless of parallelism.
RandomGenerableFactory<JDKRandomGenerator> factory = new JDKRandomGeneratorFactory()
List<BlockInfo<T>> generatorBlocks = factory
.getRandomGenerables(elementCount, cyclesPerElement);
DataSet<...> generatedEdges = env
.fromCollection(generatorBlocks)
.name("Random generators")
.flatMap(...
| Modifier and Type | Method and Description |
|---|---|
List<BlockInfo<T>> |
getRandomGenerables(long elementCount,
int cyclesPerElement)
The amount of work (
elementCount * cyclesPerElement) is used to
generate a list of blocks of work of near-equal size. |
List<BlockInfo<T>> getRandomGenerables(long elementCount, int cyclesPerElement)
elementCount * cyclesPerElement) is used to
generate a list of blocks of work of near-equal size.elementCount - number of elements, as indexed in the BlockInfocyclesPerElement - number of cycles of the PRNG per elementCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.