Skip to content

tuple_randTupleRandTupleRandtuple_randtuple_randπŸ”—

Short descriptionπŸ”—

tuple_randTupleRandTupleRandtuple_randtuple_rand β€” Return a tuple of random numbers between 0 and 1.

SignatureπŸ”—

tuple_rand( number Length, out number Rand )void TupleRand( const HTuple& Length, HTuple* Rand )static void HOperatorSet.TupleRand( HTuple length, out HTuple rand )def tuple_rand( length: int ) -> Sequence[float]

def tuple_rand_s( length: int ) -> floatHerror tuple_rand( const Hlong Length, double* Rand )

Herror T_tuple_rand( const Htuple Length, Htuple* Rand )

static HTuple HTuple::TupleRand( const HTuple& Length )

static HTuple HTuple.TupleRand( HTuple length )

DescriptionπŸ”—

tuple_randTupleRand returns a tuple of random numbers distributed uniformly in the interval [0,1). The parameter Lengthlengthlength 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" of set_systemSetSystem for information on the used random seed.

HDevelop In-line OperationπŸ”—

HDevelop provides an in-line operation for tuple_randTupleRand, which can be used in an expression in the following syntax:

Rand := rand(Length)

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

Lengthlengthlength (input_control) number β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Length of tuple to generate.

Randrandrand (output_control) number(-array) β†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Tuple of random numbers.

Combinations with other operatorsπŸ”—

Combinations

See also

tuple_gen_constTupleGenConst

ModuleπŸ”—

Foundation