Next: random utils strings, Previous: random utils lists, Up: random utils [Index]
The auxiliary library (vicare crypto randomisations vectors)
exports bindings specialised to handle vectors and randomness sources;
it is based on both (vicare crypto randomisations)
and
(vicare containers vectors)
. Arguments to the following
functions follow the same conventions established for (vicare
containers vectors)
and (vicare crypto vectors low)
.
Interface conventions
Given the closure number-maker returning a random number, build and return a new list of number-of-numbers random numbers.
Build a new vector copying the selected subvector, then shuffle it using randomness from the given source. Return the new vector.
Shuffle the selected subvector using randomness from the given source. Return the shuffled vector itself.
Return a closure that, when evaluated with no arguments, returns a randomly selected item from the selected subvector, using randomness from source.
Return a closure that, when evaluated with no arguments, returns a vector of len items randomly selected from the selected subvector of vec, using randomness from source.
Return a vector of length number-of-numbers, holding random integers in the range delimited by inclusive-min and inclusive-max, generated using randomness from source. The integers are such that their sum equals requested-sum.
Return a vector of length number-of-numbers, holding random reals in the range delimited by exclusive-min and exclusive-max, generated using randomness from source. The numbers are such that their sum equals approximately requested-sum with tolerance:
(< (- (abs tolerance)) (abs (- requested-sum actual-sum)) (abs tolerance)) ⇒ #t
Next: random utils strings, Previous: random utils lists, Up: random utils [Index]