Module random

Source
Expand description

Features high-quality random number generation using the Mersenne Twister algorithm. Application random number generation functionality

Provides access to functions for generating high-quality random numbers based on the Mersenne Twister algorithm.

Modules§

macros
The macros module contains functions for generating macros.
mersenne_twister
The mersenne_twister module contains the implementation of the Mersenne Twister algorithm.
vrd_macros
The macros module contains functions for generating macros.

Macros§

rand_bool
Generate a random boolean with a provided probability.
rand_bytes
Generate a vector of random bytes with the provided length using the provided Random (VRD) struct
rand_char
Generate a random char within the range ‘a’..=‘z’ using the provided Random (VRD) struct
rand_choose
Generate a random element from a slice of values using the provided Random (VRD) struct
rand_double
Generate a random double using the provided Random (VRD) struct
rand_float
Generate a random float using the provided Random (VRD) struct
rand_int
Generate a random integer within the given range using the provided Random (VRD) struct
rand_new
Generate a new random number
rand_pseudo
Generate a random 32-bit unsigned integer using the provided Random (VRD) struct
rand_range
Generate a random number within the given range using the provided Random (VRD) struct
rand_seed
Seed the provided Random (VRD) struct with the given value
rand_twist
Twist the state of the provided Random (VRD) struct
rand_uint
Generate a random 32-bit unsigned integer within the given range using the provided Random (VRD) struct
random_range
Generate a random 32-bit unsigned integer within the given range using the provided Random (VRD) struct

Structs§

MersenneTwisterConfig
Configuration for the Mersenne Twister algorithm.
Random
The Random struct is used to generate random numbers using the Mersenne Twister algorithm.

Functions§

run
The main entry point for the Random (VRD) library.