Integers
ixia.rand_below
Returns a random int in the range $[0, n)$.
ixia.rand_bits
Returns a non-negative Python integer with k random bits.
ixia.rand_bool
Returns a random bool with a probability p of being true (0.5 by default).
ixia.rand_int
Returns a random integer N in the range $[a, b]$.
Equivalent to ixia.rand_range(a, b+1).
ixia.rand_ints
Returns a list of k random integrs in the range $[a, b]$.
Equivalent to [rand_int(a, b) for _ in range(k)].
ixia.rand_range
Returns a randomly selected element from range(start, stop, step). This is
equivalent to ixia.choice(range(start, stop, step)), but doesn't actually
build a range object.
The positional argument pattern matches that of range(). Keyword arguments
should not be used because the function may use them in unexpected ways.
ixia.universe_rand
Generates a random number based on the universe.
Thanks to the work of the recent Nobel Prize laureates, it was possible to code this function that computes a random number by simulating universe dimensions phasing on gamma ray emission using the sum of the spins of the pair positron/electron in a normalized Higgs field. Surprisingly, Taylor series is involved in this beautiful mathematical operation. It may or may not always return $42$, we do not know.