Abstract

Random shuffling of an array in parallel.

Synopsis

open import "lib/github.com/diku-dk/cpprandom/random"
local module type shuffle = {
type rng
val shuffle [n] t: rng -> [n]t -> (rng, [n]t)
val shuffle' [n] t: [n]rng -> [n]t -> ([n]rng, [n]t)
}
module mk_shuffle: (E: rng_engine) -> shuffle with rng = E.rng

Description

local module type shuffle
type rng
val shuffle [n] t: rng -> [n]t -> (rng, [n]t)

Given a source of random numbers, shuffle an array.

val shuffle' [n] t: [n]rng -> [n]t -> ([n]rng, [n]t)

Given n sources of random numbers, shuffle an n element array.