MCPcopy Create free account
hub / github.com/argumentcomputer/ix / next_u32

Method next_u32

crates/kernel/src/level.rs:1041–1046  ·  view source on GitHub ↗
(&mut self, bound: u32)

Source from the content-addressed store, hash-verified

1039 //
1040 // Use a deterministic seeded generator (xorshift) to produce randomized
1041 // `KUniv<Anon>` values of bounded depth and check algebraic laws:
1042 // reflexivity, symmetry of equality, transitivity of geq, and interaction
1043 // between geq and eq.
1044 // =========================================================================
1045
1046 struct UPrng(u64);
1047 impl UPrng {
1048 fn new(seed: u64) -> Self {
1049 UPrng(seed.wrapping_mul(0x9E37_79B9_7F4A_7C15) ^ 0xDEAD_BEEF_CAFE_BABE)

Callers 2

gen_univFunction · 0.45
gen_univ_no_imaxFunction · 0.45

Calls 2

next_u64Method · 0.45
maxMethod · 0.45

Tested by

no test coverage detected