lines 6-50 of file: cpp/lib/uniform_01.cpp {xrst_begin uniform_01} {xrst_spell srand std } Simulate a [0,1] Uniform Random Variate ####################################### Syntax ****** | |tab| ``# include `` | |tab| ``std::srand`` ( *seed* ) | |tab| ``cmpad::uniform_01`` ( *x* ) Prototype ********* {xrst_literal // BEGIN PROTOTYPE // END PROTOTYPE } 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]. {xrst_toc_hidden cpp/xam/uniform_01.cpp } Example ******* :ref:`xam_uniform_01.cpp-name` contains an example and test of this routine. {xrst_end uniform_01}