- SystemML Class
std/2009/random/numeric
- Summary
- Source of pseudo-random numeric data
- Status
- Stable
Overview
A source of pseudo-random numeric data. The data output is generated at run-time by an internal random number generator, and is repeatable by seeding with an explicit Seed.
Notes
This process uses std/util/rng internally - processes only needing random data internally should use this utility, rather than accepting input from this process.
Connectivity
- No inputs.
- One output, the data generated.
State
This Process stores its State in DataML.
- dims (
INT64 1xN) - The dimension of the output data as [a, b, ...].
- dist (STRING)
- Distribution, one of "normal", "uniform" or "exponential".
- pars (
DOUBLE 1xP) - Specific to distribution. May be
[mean sd] (normal), [min max] (uniform, value of exactly "max" is never output) or [min sd] (exponential).
- complex (BOOLEAN scalar) OPTIONAL
- If present and true, generate complex output data (i.e. twice as much output).
- outputName (STRING) OPTIONAL
- If supplied, the name of the single output (if not, "out" is used).
Example
Script
M Source Code (against 995)
fS = 1000 ;
sys = sml_system;
state = [];
state .dims = [3 2 ];
state .dist = 'normal';
state .pars = [3 0 .1 ];
sys = sys .addprocess('src', 'std/2009/random/numeric', fS , state );
exe = brahms_execution;
exe .all = true ;
exe .stop = 1 ;
out = brahms(sys , exe );
out .src
plot (reshape (out .src .out , 6000 , []))
Expected Output
Matlab Console
ans =
out: [3x2x1000 double]
|