src/math/random.bend checks
raw source on the hub · import 0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random.bend as Random
6 imports
import Base import ./u64.bend as W import ./f64.bend as F import ./random/rand.bend as R import ./random/chacha8.bend as C8 import ./random/pcg.bend as P
Definitions
def chacha8 source · line 47 · raw
@+seed:List<&2, U32> -> Maybe<&2, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random/chacha8.ChaCha8>
def chacha8_next source · line 50 · raw
@g:0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random/chacha8.ChaCha8 -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random/chacha8.ChaCha8)
def pcg source · line 53 · raw
@+seed1:0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64 -> @+seed2:0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64 -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random/pcg.PCG
def pcg_next source · line 56 · raw
@p:0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random/pcg.PCG -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/random/pcg.PCG)
Templates
template uint64 source · line 59 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)
template uint32 source · line 62 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> Pair(U32, S)
template int64 source · line 65 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)
template int32 source · line 68 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> Pair(U32, S)
template uint64n source · line 71 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+n:0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64 -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)
template uint_below source · line 74 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+n:0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64 -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)
template uint32n source · line 77 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+n:U32 -> Pair(U32, S)
template intn source · line 80 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+n:Nat -> Pair(Nat, S)
template int_range source · line 83 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+lo:Nat -> @+hi:Nat -> Pair(Nat, S)
template float64 source · line 86 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/f64.F64, S)
template shuffle source · line 89 · raw
@-A:Data -> @-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+xs:List<&2, A> -> Pair(List<&2, A>, S)
template perm source · line 92 · raw
@-S:Data -> @-next:(@_:S -> Pair(0xd9a2fae439ac7ff9e21e0853948f94fe/src/math/u64.U64, S)) -> @s:S -> @+n:Nat -> Pair(List<&2, Nat>, S)