Problems.dtlz7_g: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/problems.bend as Problems Lines 413-417 of unified-nsga-iii@0.2.2.0/problems.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/problems.bend&start_line=413&end_line=417 import Base import unified-nsga-iii@0.2.2.0/util.bend as Util # C# Dtlz7Problem g: 1 + 9 * sum(x[M-1..]) / (n - M + 1). def dtlz7_g(+x: List<&2, F32>, m: Nat) -> F32: +tail = tail_from_m(x, m) +den = pos_or(F32.from_nat(Util.list_len(F32, tail)), 1.0) F32.add(1.0, F32.div(F32.mul(9.0, sum_from(tail)), den)) Uses (11): 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.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/problems.bend&name=pos_or https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/problems.bend&name=sum_from https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/problems.bend&name=tail_from_m https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=list_len