RandomGeneratorProvider

class RandomGeneratorProvider(generator: RandomGenerator) : UniformRandomProvider

Implements UniformRandomProvider by delegating all operations to RandomGenerator.

Constructors

Link copied to clipboard
fun RandomGeneratorProvider(generator: RandomGenerator)

Functions

Link copied to clipboard
open override fun nextBoolean(): Boolean

Generates a Boolean value.

Link copied to clipboard
open override fun nextBytes(bytes: ByteArray)
open override fun nextBytes(bytes: ByteArray, start: Int, len: Int)

Generates Byte values and places them into a user-supplied array.

Link copied to clipboard
open override fun nextDouble(): Double

Generates a Double value between 0 and 1.

Link copied to clipboard
open override fun nextFloat(): Float

Generates a Float value between 0 and 1.

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).

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

Link copied to clipboard
val generator: RandomGenerator

the underlying RandomGenerator object.

Sources

Link copied to clipboard