package nuod:random
Index
Constants (0)
This section is empty.
Variables (0)
This section is empty.
Procedures (26)
- beta_sample
- exponential_sample
- gamma_sample
- get_seed
- handle_arbitrary_read
- handle_query_info
- inner_rand_proc
- laplace_sample
- normal_sample
- pcg_random_generator
- pcg_random_proc
- quick_read_ptr
- random_float
- random_float_range
- random_int
- random_int_max
- rotl32
- rotl64
- rotr32
- rotr64
- splitmix64_random_generator
- splitmix_random_proc
- xorshift128plus_random_generator
- xorshift128plus_random_proc
- xorshift64star_random_generator
- xorshift64star_random_proc
Procedure Groups (0)
This section is empty.
Types
RandomState128 ¶
Related Procedures With Parameters
Xorshift128PlusRandomState ¶
Xorshift128PlusRandomState :: RandomState128
Related Procedures With Parameters
Xorshift64StarRandomState ¶
Xorshift64StarRandomState :: RandomState64
Related Procedures With Parameters
Constants
This section is empty.
Variables
This section is empty.
Procedures
beta_sample ¶
beta_sample :: proc( alpha: $T, beta: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location, ) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random values sampled from a beta distribution.
NOTE: the type of 'lambda' decides the type of generated array.
Inputs:
alpha: a control parameter for the distribution.
beta: a control parameter for the distribution.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
exponential_sample ¶
exponential_sample :: proc(lambda: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random values sampled from an exponential distribution.
NOTE: the type of 'lambda' decides the type of generated array.
Inputs:
lambda: a control parameter for the distribution.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
gamma_sample ¶
gamma_sample :: proc( alpha: $T, beta: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location, ) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random values sampled from a gamma distribution.
NOTE: the type of 'lambda' decides the type of generated array.
Inputs:
alpha: a control parameter for the distribution.
beta: a control parameter for the distribution.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
handle_query_info ¶
handle_query_info :: proc(p: []u8, info_config: runtime.Random_Generator_Query_Info) {…}
laplace_sample ¶
laplace_sample :: proc( mean: $T, b: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location, ) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random values sampled from a laplace distribution.
NOTE: the type of 'lambda' decides the type of generated array.
Inputs:
mean: a control parameter for the distribution.
b: a control parameter for the distribution.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
normal_sample ¶
normal_sample :: proc( mean: $T, stddev: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location, ) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random values sampled from a normal distribution.
NOTE: the type of 'lambda' decides the type of generated array.
Inputs:
mean: a control parameter for the distribution.
stddev: a control parameter for the distribution.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
pcg_random_generator ¶
pcg_random_generator :: proc "contextless" (rs: ^RandomState64 = nil) -> runtime.Random_Generator {…}
pcg_random_proc ¶
pcg_random_proc :: proc(data: rawptr, mode: runtime.Random_Generator_Mode, p: []u8) {…}
quick_read_ptr ¶
quick_read_ptr :: proc(rg: runtime.Random_Generator, p: rawptr, len: uint) {…}
random_float ¶
random_float :: proc($T: typeid, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location) -> (mdarray: mdarray.MdArray($T=typeid, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random floatpoint values in between 0 and 1.
Inputs:
T: the type of floatpoint value to generate.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
random_float_range ¶
random_float_range :: proc( low: $T, high: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location, ) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random floatpoint values in between an low and high value.
NOTE: the type of 'low' and 'high' decides the type of generated array.
Inputs:
low: the lowest floatpoint value to generate.
high: the highest floatpoint value to generate.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
random_int ¶
random_int :: proc($T: typeid, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location) -> (mdarray: mdarray.MdArray($T=typeid, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random integers.
Inputs:
T: the type of integer to generate.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
random_int_max ¶
random_int_max :: proc(max_value: $T, shape: [0]untyped integer, gen := context.random_generator, allocator := context.allocator, location := #caller_location) -> (mdarray: mdarray.MdArray($T, $Nd), ok: bool) #optional_ok {…}
Generate a multidimensional array and fill it with random integers capped at a maximum.
NOTE: the type of 'max_value' decides the type of generated array.
Inputs:
max_value: the maximum integer value to generate.
shape: the shape of generated array.
gen: the random number generator object.
allocator: the allocator used internally.
location: a debugging variable used to trace the location of the calling procedure.
Returns:
mdarray: the generated array.
ok: an optional boolean for error handling.
splitmix64_random_generator ¶
splitmix64_random_generator :: proc "contextless" (rs: ^RandomState64 = nil) -> runtime.Random_Generator {…}
splitmix_random_proc ¶
splitmix_random_proc :: proc(data: rawptr, mode: runtime.Random_Generator_Mode, p: []u8) {…}
xorshift128plus_random_generator ¶
xorshift128plus_random_generator :: proc "contextless" (rs: ^RandomState128 = nil) -> runtime.Random_Generator {…}
xorshift128plus_random_proc ¶
xorshift128plus_random_proc :: proc(data: rawptr, mode: runtime.Random_Generator_Mode, p: []u8) {…}
xorshift64star_random_generator ¶
xorshift64star_random_generator :: proc "contextless" (rs: ^RandomState64 = nil) -> runtime.Random_Generator {…}
xorshift64star_random_proc ¶
xorshift64star_random_proc :: proc(data: rawptr, mode: runtime.Random_Generator_Mode, p: []u8) {…}
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2025-11 (vendor "odin") Linux_amd64 @ 2025-11-15 02:28:15.952953668 +0000 UTC