\(\newcommand{\W}[1]{ \; #1 \; }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }\) \(\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }\) \(\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }\) \(\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }\)
uniform_01¶
Simulate a [0,1] Uniform Random Variate¶
Inclusion¶
The template function uniform_01
is defined in the CppAD
namespace by including
the file cppad/speed/uniform_01.hpp
(relative to the CppAD distribution directory).
seed¶
The argument seed has prototype
size_t
seed
It specifies a seed for the uniform random number generator.
n¶
The argument n has prototype
size_t
n
It specifies the number of elements in the random vector x .
x¶
The argument x has prototype
Vector & x
. The input value of the elements of x does not matter. Upon return, the elements of x are set to values randomly sampled over the interval [0,1].