polydat 0.1.0

Polydat — generation kernel for deterministic variate generation in nb-rs (formerly nbrs-variates)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// constant_folding.gk — Init-time constant propagation (SRD 44).
//
// Nodes with no coordinate dependency are evaluated once at init time
// and replaced with constants. The cycle-time graph sees them as literals.
//
// Expected events:
//   ConstantFolded: base → 42
//   ConstantFolded: seed → <hash of 42>

input cycle: u64
base := 42
seed := hash(base)
user_id := mod(hash(cycle), 1000000)