Skip to contents

Create independent L'Ecuyer-CMRG random-number streams, one per randomisation run of estimate_roc(), so that each run draws the same random numbers wherever it is computed (single core or any worker).

Usage

util_make_rng_streams(n_streams, seed)

Arguments

n_streams

numeric. Whole number of streams to create, at least 1.

seed

numeric. Single whole number that seeds the first stream.

Value

A list of length n_streams. Each element is an integer vector of length 7, a value of .Random.seed for the "L'Ecuyer-CMRG" generator.

Details

The first stream is the state of the "L'Ecuyer-CMRG" generator after set.seed(seed), and each following stream is parallel::nextRNGStream() of the previous one. The caller's random-number generator kind and state are left unchanged.