Random Module

http://xqerl.org/modules/random

This module is statically bound to the prefix "random".

Description
Helper module for creating random values.
Functions

random:double


Signature
random:double() as xs:double
Description
Returns a random xs:double value greater than or equal to 0 and less than 1.
back to top

random:integer


Signature
random:integer() as xs:integer
random:integer($max as xs:integer) as xs:integer
Description
Returns a random xs:integer value greater than or equal to 0 and less than $max.
The 0-ary version of this function is the same as calling the 1-ary version using 2^64.
back to top

random:seeded-double


Signature
random:seeded-double($seed as xs:integer, $num as xs:integer) as xs:double*
Description
Returns a sequence of $num random xs:double values using $seed as the seed.
back to top

random:seeded-integer


Signature
random:seeded-integer($seed as xs:integer, $num as xs:integer) as xs:integer*
random:seeded-integer($seed as xs:integer, $num as xs:integer, $max as xs:integer) as xs:integer*
Description
Returns a sequence of $num random xs:integer values using $seed as the seed and $max as the maximum value.
back to top

random:gaussian


Signature
random:gaussian($num as xs:integer) as xs:double*
Description
Returns a sequence of $num normally distributed xs:double values.
back to top

random:seeded-permutation


Signature
random:seeded-permutation($seed as xs:integer, $items as item()*) as item()*
Description
Returns the sequence $items in a random order, using $seed as the seed value.
back to top

random:uuid


Signature
random:uuid() as xs:string
Description
Returns a random Universally Unique Identifer.
back to top