Set seed for random number generator. A common practice to get a ‘real’ random number is to use:
#include <ctime> ... xt::random::seed(time(NULL));
Produces (an array of) random positive floating-point values, distributed according to the probability density:
where \(\alpha\) is the shape (also known as \(k\)) and \(\beta\) the scale (also known as \(\theta\)), and \(\Gamma\) is the Gamma function.
Do not confuse the first argument of
xt::random, the shape of the output array, with the parameter \(alpha\).