Problems.dtlz1_g: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/problems.bend as Problems Lines 275-279 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=275&end_line=279 import Base import unified-nsga-iii@0.2.2.0/util.bend as Util # C# DtlzHelper.GDtlz1: 100 * ((n - M + 1) + Σ (d² - cos(20 π d))), d = x-0.5. # On a legal k≥1 box the tail length is n-M+1, which is that coefficient. def dtlz1_g(+x: List<&2, F32>, m: Nat) -> F32: +tail = tail_from_m(x, m) F32.mul(100.0, F32.add(F32.from_nat(Util.list_len(F32, tail)), sum_dtlz1(tail))) Uses (9): 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.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=sum_dtlz1 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