tuple_randtuple_randTupleRandTupleRandtuple_rand (Operator)
Name
tuple_randtuple_randTupleRandTupleRandtuple_rand
— Return a tuple of random numbers between 0 and 1.
Signature
Herror tuple_rand(const Hlong Length, double* Rand)
Herror T_tuple_rand(const Htuple Length, Htuple* Rand)
def tuple_rand(length: int) -> Sequence[float]
def tuple_rand_s(length: int) -> float
Description
tuple_randtuple_randTupleRandTupleRandtuple_rand
returns a tuple of random numbers distributed
uniformly in the interval [0,1). The parameter LengthLengthLengthlengthlength
specifies the length of the output tuple, i.e., how many random
numbers are generated.
The random numbers are generated using the C function “drand48()”.
See the parameter 'seed_rand'"seed_rand""seed_rand""seed_rand""seed_rand" of set_systemset_systemSetSystemSetSystemset_system
for
information on the used random seed.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_randtuple_randTupleRandTupleRandtuple_rand
,
which can be used in an expression in the following syntax:
Rand := rand(Length)
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
LengthLengthLengthlengthlength
(input_control) number →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Length of tuple to generate.
RandRandRandrandrand
(output_control) number(-array) →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Tuple of random numbers.
See also
tuple_gen_consttuple_gen_constTupleGenConstTupleGenConsttuple_gen_const
Module
Foundation