logo-header

 
 

rnd_uniform

syntax

definition

rnd_uniform(seed, DomainUnit, valuesrange) results in a data item with pseudo random values and with the following arguments:

  • a random seed with a unique number; using the same random seed results in the same random values;
  • the DomainUnit of the resulting data item; 
  • the valuesrange determines the range of possible values. Use the range function to configure this range.

applies to

Data item random seed with value type:

  • uint32

Unit domainunit with value type:

  • group: CanBeDomainUnit

conditions

The resulting data item need to match with regard to it's values unit with the values unit of the valuesrange .

since version

5.15

example

attribute<float32> rand (ADomain): expr = 
"rnd_uniform("
"
0"
",ADomain"
",range(float32, float32(0), float32(1))"
")";
rand
0.719643
0.781171
0.974884
0.446728
0.087888
Table ADomain, nr of rows = 5

see also


OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904



Recent Wiki Changes