Algorithm.rand_xs.go: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/algorithm.bend as Algorithm Lines 93-108 of unified-nsga-iii@0.2.2.0/algorithm.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/algorithm.bend&start_line=93&end_line=108 import Base import unified-nsga-iii@0.2.2.0/bounds.bend as Bounds import unified-nsga-iii@0.2.2.0/rng.bend as Rng def rand_xs.go(+box: Bounds.Box, fuel: Nat, +i: Nat, rng: Rng.State, acc: List<&2, F32>) -> Rng.State & List<&2, F32>: match fuel: case 0n: (rng, List.reverse(&2, F32, acc)) case 1n+f: +iv = Bounds.at(box, i) +rng2 = Rng.next_double(rng) +lo = Bounds.lo(iv) +hi = Bounds.hi(iv) rand_xs.go( box, f, 1n+i, rng2, F32.add(lo, F32.mul(F32.sub(hi, lo), Rng.last_double(rng2))) <> acc ) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/bounds.bend&name=Box https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/bounds.bend&name=at https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/bounds.bend&name=hi https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/bounds.bend&name=lo https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=State https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=last_double https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=next_double