public interface SplittableUniformRandomProvider extends UniformRandomProvider
Ideally all generators produced by recursive splitting from the original object are statistically independent and individually uniform. In this case it would be expected that the set of values collectively generated from a group of split generators would have the same statistical properties as the same number of values produced from a single generator object.
| Modifier and Type | Method and Description |
|---|---|
default DoubleStream |
doubles()
Returns an effectively unlimited stream of
double values between 0
(inclusive) and 1 (exclusive). |
default DoubleStream |
doubles(double origin,
double bound)
Returns an effectively unlimited stream of
double values between the
specified origin (inclusive) and the specified bound (exclusive). |
default DoubleStream |
doubles(long streamSize)
Returns a stream producing the given
streamSize number of double
values between 0 (inclusive) and 1 (exclusive). |
default DoubleStream |
doubles(long streamSize,
double origin,
double bound)
Returns a stream producing the given
streamSize number of double
values between the specified origin (inclusive) and the specified
bound (exclusive). |
default IntStream |
ints()
Returns an effectively unlimited stream of
int values. |
default IntStream |
ints(int origin,
int bound)
Returns an effectively unlimited stream of
int values between the specified
origin (inclusive) and the specified bound (exclusive). |
default IntStream |
ints(long streamSize)
Returns a stream producing the given
streamSize number of int
values. |
default IntStream |
ints(long streamSize,
int origin,
int bound)
Returns a stream producing the given
streamSize number of int
values between the specified origin (inclusive) and the specified
bound (exclusive). |
default LongStream |
longs()
Returns an effectively unlimited stream of
long values. |
default LongStream |
longs(long streamSize)
Returns a stream producing the given
streamSize number of long
values. |
default LongStream |
longs(long origin,
long bound)
Returns an effectively unlimited stream of
long values between the
specified origin (inclusive) and the specified bound (exclusive). |
default LongStream |
longs(long streamSize,
long origin,
long bound)
Returns a stream producing the given
streamSize number of long
values between the specified origin (inclusive) and the specified
bound (exclusive). |
default SplittableUniformRandomProvider |
split()
Creates a new random generator, split off from this one, that implements
the
SplittableUniformRandomProvider interface. |
SplittableUniformRandomProvider |
split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements
the
SplittableUniformRandomProvider interface. |
default Stream<SplittableUniformRandomProvider> |
splits()
Returns an effectively unlimited stream of new random generators, each of which
implements the
SplittableUniformRandomProvider interface. |
default Stream<SplittableUniformRandomProvider> |
splits(long streamSize)
Returns a stream producing the given
streamSize number of new random
generators, each of which implements the SplittableUniformRandomProvider
interface. |
default Stream<SplittableUniformRandomProvider> |
splits(long streamSize,
SplittableUniformRandomProvider source)
Returns a stream producing the given
streamSize number of new random
generators, each of which implements the SplittableUniformRandomProvider
interface. |
default Stream<SplittableUniformRandomProvider> |
splits(SplittableUniformRandomProvider source)
Returns an effectively unlimited stream of new random generators, each of which
implements the
SplittableUniformRandomProvider interface. |
nextBoolean, nextBytes, nextBytes, nextDouble, nextDouble, nextDouble, nextFloat, nextFloat, nextFloat, nextInt, nextInt, nextInt, nextLong, nextLong, nextLongdefault SplittableUniformRandomProvider split()
SplittableUniformRandomProvider interface.
The current generator may be used a source of randomness to initialise the new instance. In this case repeat invocations of this method will return objects with a different initial state that are expected to be statistically independent.
SplittableUniformRandomProvider split(UniformRandomProvider source)
SplittableUniformRandomProvider interface.source - A source of randomness used to initialise the new instance.NullPointerException - if source is nulldefault Stream<SplittableUniformRandomProvider> splits()
SplittableUniformRandomProvider interface.
The current generator may be used a source of randomness to initialise the new instances.
default Stream<SplittableUniformRandomProvider> splits(SplittableUniformRandomProvider source)
SplittableUniformRandomProvider interface.source - A source of randomness used to initialise the new instances; this may
be split to provide a source of randomness across a parallel stream.NullPointerException - if source is nulldefault Stream<SplittableUniformRandomProvider> splits(long streamSize)
streamSize number of new random
generators, each of which implements the SplittableUniformRandomProvider
interface.
The current generator may be used a source of randomness to initialise the new instances.
streamSize - Number of objects to generate.streamSize.IllegalArgumentException - if streamSize is negative.default Stream<SplittableUniformRandomProvider> splits(long streamSize, SplittableUniformRandomProvider source)
streamSize number of new random
generators, each of which implements the SplittableUniformRandomProvider
interface.streamSize - Number of objects to generate.source - A source of randomness used to initialise the new instances; this may
be split to provide a source of randomness across a parallel stream.streamSize.IllegalArgumentException - if streamSize is negative.NullPointerException - if source is nulldefault IntStream ints()
UniformRandomProviderint values.ints in interface UniformRandomProviderint values.default IntStream ints(int origin, int bound)
UniformRandomProviderint values between the specified
origin (inclusive) and the specified bound (exclusive).ints in interface UniformRandomProviderorigin - Lower bound on the random number to be returned.bound - Upper bound (exclusive) on the random number to be returned.origin (inclusive)
and the specified bound (exclusive).default IntStream ints(long streamSize)
UniformRandomProviderstreamSize number of int
values.ints in interface UniformRandomProviderstreamSize - Number of values to generate.int values; the stream is limited to the given
streamSize.default IntStream ints(long streamSize, int origin, int bound)
UniformRandomProviderstreamSize number of int
values between the specified origin (inclusive) and the specified
bound (exclusive).ints in interface UniformRandomProviderstreamSize - Number of values to generate.origin - Lower bound on the random number to be returned.bound - Upper bound (exclusive) on the random number to be returned.origin (inclusive)
and the specified bound (exclusive); the stream is limited to the given
streamSize.default LongStream longs()
UniformRandomProviderlong values.longs in interface UniformRandomProviderlong values.default LongStream longs(long origin, long bound)
UniformRandomProviderlong values between the
specified origin (inclusive) and the specified bound (exclusive).longs in interface UniformRandomProviderorigin - Lower bound on the random number to be returned.bound - Upper bound (exclusive) on the random number to be returned.origin (inclusive)
and the specified bound (exclusive).default LongStream longs(long streamSize)
UniformRandomProviderstreamSize number of long
values.longs in interface UniformRandomProviderstreamSize - Number of values to generate.long values; the stream is limited to the given
streamSize.default LongStream longs(long streamSize, long origin, long bound)
UniformRandomProviderstreamSize number of long
values between the specified origin (inclusive) and the specified
bound (exclusive).longs in interface UniformRandomProviderstreamSize - Number of values to generate.origin - Lower bound on the random number to be returned.bound - Upper bound (exclusive) on the random number to be returned.origin (inclusive)
and the specified bound (exclusive); the stream is limited to the given
streamSize.default DoubleStream doubles()
UniformRandomProviderdouble values between 0
(inclusive) and 1 (exclusive).doubles in interface UniformRandomProviderdefault DoubleStream doubles(double origin, double bound)
UniformRandomProviderdouble values between the
specified origin (inclusive) and the specified bound (exclusive).doubles in interface UniformRandomProviderorigin - Lower bound on the random number to be returned.bound - Upper bound (exclusive) on the random number to be returned.origin (inclusive)
and the specified bound (exclusive).default DoubleStream doubles(long streamSize)
UniformRandomProviderstreamSize number of double
values between 0 (inclusive) and 1 (exclusive).doubles in interface UniformRandomProviderstreamSize - Number of values to generate.streamSize.default DoubleStream doubles(long streamSize, double origin, double bound)
UniformRandomProviderstreamSize number of double
values between the specified origin (inclusive) and the specified
bound (exclusive).doubles in interface UniformRandomProviderstreamSize - Number of values to generate.origin - Lower bound on the random number to be returned.bound - Upper bound (exclusive) on the random number to be returned.origin (inclusive)
and the specified bound (exclusive); the stream is limited to the given
streamSize.Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.