Random#
Description#
The random
exposes several functions that have to to with
randomness and the generation thereof. It offers basic RNG as well as
several higher level functions that genrate random numbers from
specific distribution.
Internally random
uses the C++ facilities for random numbers. Currently the module uses the
mt19937 pseudorandom number generator
providced by the standard c++ library. random
does, however, provide access to lower level
C-functions like crand.
Functions#
fisher-f : (fisher-f A B)
Return a random real number from a f-distribution distribution with m=A, n=B
student-t : (student-t A)
Return a random real number from a studnet-t distribution with n=A
seed : (seed INT)
Seed the random engine with the given integer.
geometric : (geometric A)
Return a random real number from a geometric distribution with p=A
seed-rand : (seed-rand)
Seed the random engine with random numbers from the base random device.
gamma : (gamma A B)
Return a random real number from a gamma distribution with k=A, theta=B
csrand : (csrand [INT])
Call csrand with the given integer or with the current time if none is provided.
rand-int : (rand-int LOWER UPPER)
Return a random integer in the range [LOWER, UPPER]
choice : (choice LIST)
Return a random element from the list LIST
.
gauss : (gauss A B)
Return a random real number from a gauss distribution with mean=A, std=B
sample : (choice LIST CNT)
Return a list with CNT
random elements from the list LIST
.
weibull : (weibull A B)
Return a random real number from a weibull distribution with lambda=A, k=B
crand : (crand)
Return a random number generated by crand.
uniform : (uniform A B)
Return a random real number from an uniform distribution of [A, B].
exponential : (exponential A)
Return a random real number from an exponential distribution with e=A
lognorm : (lognorm A)
Return a random real number from a log-normal distribution with mean=A, std=B