Rng

data class Rng(val state: RngState)

Constructors

Link copied to clipboard
constructor(state: RngState)
constructor(seed: Long)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun <T> draw(from: List<T>): Triple<T, List<T>, Rng>

Draws one element uniformly, returning (chosen, remaining, advancedRng).

Link copied to clipboard
fun nextInt(bound: Int): Pair<Int, Rng>

Uniform in [0, bound).

Link copied to clipboard