Next: randome, Previous: randomb, Up: Internal Routines [Contents][Index]

`randomd( [seed=`

`seed`,] `distribution`, `dimensions`)

Returns a `long`

array with the specified

,
which may be a set of integer arguments, or a single integer array. The
returned array is filled with integers between `dimensions``0`

and
`num_elem(`

(inclusive) that are drawn at
random according to the distribution function given by
`distribution`) - 1

. The elements of the distribution function
must be monotonically increasing, i.e., no element may be smaller than
the preceding element. Also, we must have `distribution``distribution(0)`

greater than or equal to zero, and `distribution(*-1)`

equal to
`1`

. The probability that a particular returned number is equal to
`x`

is given by `differ(distribution,0,1)`

(if

is a one-dimensional array).
`distribution`

specifies a seed for the random numbers, and must be
non-zero. The same seed generates the same sequence of pseudo-random
numbers every time. Different seeds generate different sequences.
`seed`

See also: random, Random Arrays