package nuod:random

⌘K
Ctrl+K
or
/

    Types

    RandomState128 ¶

    RandomState128 :: struct {
    	x: u64,
    	y: u64,
    }
    Related Procedures With Parameters

    RandomState64 ¶

    RandomState64 :: struct {
    	x: u64,
    }
    Related Procedures With Parameters

    Xorshift128PlusRandomState ¶

    Xorshift128PlusRandomState :: RandomState128
    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.

    get_seed ¶

    get_seed :: proc "contextless" (p: []u8) -> u64 {…}

    handle_arbitrary_read ¶

    handle_arbitrary_read :: proc($T: typeid, random_state: ^$S, read_f: proc "contextless" (^$S) -> typeid, p: []u8) {…}

    handle_query_info ¶

    handle_query_info :: proc(p: []u8, info_config: runtime.Random_Generator_Query_Info) {…}

    inner_rand_proc ¶

    inner_rand_proc :: proc(
    	$T: typeid, $RS:  typeid, 
    	init_f: proc(rs: ^typeid, seed: u64), 
    	read_f: proc "contextless" (rs: ^typeid) -> typeid, 
    	data:   rawptr, 
    	mode:   runtime.Random_Generator_Mode, 
    	p:      []u8, 
    ) {…}

    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.

    rotl32 ¶

    rotl32 :: proc "contextless" (x: u32, r: u32) -> u32 {…}

    rotl64 ¶

    rotl64 :: proc "contextless" (x: u64, r: u64) -> u64 {…}

    rotr32 ¶

    rotr32 :: proc "contextless" (x: u32, r: u32) -> u32 {…}

    rotr64 ¶

    rotr64 :: proc "contextless" (x: u64, r: u64) -> u64 {…}

    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