\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
uniform_01¶
View page sourceSimulate a [0,1] Uniform Random Variate¶
Syntax¶
# include <cmpad/speed/uniform_01.hpp>std::srand ( seed )cmpad::uniform_01 ( x )Prototype¶
void uniform_01(cmpad::vector<double>& x)
Purpose¶
This routine is used to create random values for speed testing.
seed¶
The argument seed specifies a seed for the uniform random number generator.
x¶
The input value of the elements of x does not matter. Upon return, the elements of x are set to values uniformly sampled over the interval [0,1].
Example¶
xam_uniform_01.cpp contains an example and test of this routine.