RandPCG v0.1.1 RandPCG View Source
Generate random numbers based on the PCG Algorithm
Link to this section Summary
Types
32 bit unsigned integer Elixir has arbitrary precision, but the random numbers are limited
64 bit unsigned integer Elixir has arbitrary precision, but the random numbers are limited
Functions
Move the state forward
Sets the process incrimenter
Returns random integer, x, such that, 1 <= x <= n
Returns random integer, x, such that, min <= x <= max
Returns a random 32bit integer
Examples
iex> RandPCG.start_link
iex> RandPCG.random
3242229798
Returns a random entry from the enum max 32bit length
Returns a random integer x, min <= x <= max 32bit based
Returns a random integer x, min <= x <= max 32bit based
Sets the process seed
Returns the current state of the process
Sets the current state of the process
Returns a random 32bit integer using XSH RR (good for 64-bit state, 32-bit output)
Link to this section Types
32 bit unsigned integer Elixir has arbitrary precision, but the random numbers are limited
64 bit unsigned integer Elixir has arbitrary precision, but the random numbers are limited
Link to this section Functions
Move the state forward
Sets the process incrimenter
rand_int(non_neg_integer, non_neg_integer | RandPCG.State.t) :: uint32
Returns random integer, x, such that, 1 <= x <= n
rand_int(non_neg_integer, non_neg_integer, any) :: uint32
rand_int(non_neg_integer, non_neg_integer, uint64 | RandPCG.State.t) :: uint32
rand_int(non_neg_integer, non_neg_integer, RandPCG.State.t) :: uint32
rand_int(non_neg_integer, non_neg_integer, uint64) :: uint32
Returns random integer, x, such that, min <= x <= max
Returns a random entry from the enum max 32bit length
random(:float, non_neg_integer) :: [float]
random(non_neg_integer, non_neg_integer) :: uint32
Returns a random integer x, min <= x <= max 32bit based
random(non_neg_integer, non_neg_integer, non_neg_integer) :: [uint32]
Returns a random integer x, min <= x <= max 32bit based
Sets the process seed
Returns the current state of the process
Sets the current state of the process
xsh_rr(RandPCG.State.t) :: uint32
xsh_rr(uint64) :: uint32
Returns a random 32bit integer using XSH RR (good for 64-bit state, 32-bit output)