RandomGeneratorProvider

class RandomGeneratorProvider(generator: RandomGenerator) : UniformRandomProvider

Implements UniformRandomProvider by delegating all operations to RandomGenerator.

Constructors

RandomGeneratorProvider
Link copied to clipboard
fun RandomGeneratorProvider(generator: RandomGenerator)

Functions

nextBoolean
Link copied to clipboard
open override fun nextBoolean(): Boolean
Generates a Boolean value.
nextBytes
Link copied to clipboard
open override fun nextBytes(bytes: ByteArray)
Generates Byte values and places them into a user-supplied array.
open override fun nextBytes(bytes: ByteArray, start: Int, len: Int)
Generates Byte values and places them into a user-supplied array.
nextDouble
Link copied to clipboard
open override fun nextDouble(): Double
Generates a Double value between 0 and 1.
nextFloat
Link copied to clipboard
open override fun nextFloat(): Float
Generates a Float value between 0 and 1.
nextInt
Link copied to clipboard
open override fun nextInt(): Int
Generates an Int value.
open override fun nextInt(n: Int): Int
Generates an Int value between 0 (inclusive) and the specified value (exclusive).
nextLong
Link copied to clipboard
open override fun nextLong(): Long
Generates a Long value.
open override fun nextLong(n: Long): Long
Generates a Long value between 0 (inclusive) and the specified value (exclusive).

Properties

generator
Link copied to clipboard
val generator: RandomGenerator
the underlying RandomGenerator object.

Sources

jvm source
Link copied to clipboard