Random sample of integers from 0..n-1. Equivalent to R's sample.int(). Unlike R, it is 0-based.
The result is R's sample.int(n, ...) minus 1, so it can be used directly as array
indices. It consumes the same random numbers as R (default sample.kind = "Rejection").
Parameters
n: number
Number of candidates: a non-negative number up to 4.5e15 (2^52, as R); below 2^31 with prob, and for
sampling without replacement more than n / 2 of them.
Random sample of integers from
0..n-1. Equivalent to R'ssample.int(). Unlike R, it is 0-based.The result is R's
sample.int(n, ...)minus 1, so it can be used directly as array indices. It consumes the same random numbers as R (defaultsample.kind = "Rejection").