-
- All Implemented Interfaces:
public final class RandomGeneratorExtensionKt
-
-
Method Summary
Modifier and Type Method Description final static DoublenextDouble(RandomGenerator $self, Double from, Double to)Generate a random double between the given bounds. final static <R extends Any> Iterable<R>shuffled(Iterable<R> $self, RandomGenerator rg)Fisher–Yates shuffle algorithm using Apache random number generator. -
-
Method Detail
-
nextDouble
final static Double nextDouble(RandomGenerator $self, Double from, Double to)
Generate a random double between the given bounds.
- Parameters:
from-the lower bound.to-the upper bound.
-
shuffled
final static <R extends Any> Iterable<R> shuffled(Iterable<R> $self, RandomGenerator rg)
Fisher–Yates shuffle algorithm using Apache random number generator. More information on Wikipedia.
- Parameters:
rg-the simulation {@link RandomGenerator}.
-
-
-
-