def dtlz1_g

unified-nsga-iii@0.2.2.0 · problems.bend:275

import unified-nsga-iii@0.2.2.0/problems.bend as Problems
import Base
import unified-nsga-iii@0.2.2.0/util.bend as Util

275# C# DtlzHelper.GDtlz1: 100 * ((n - M + 1) + Σ (d² - cos(20 π d))), d = x-0.5.
276# On a legal k≥1 box the tail length is n-M+1, which is that coefficient.
277def dtlz1_g(+x: List<&2, F32>, m: Nat) -> F32:
278  +tail = tail_from_m(x, m)
279  F32.mul(100.0, F32.add(F32.from_nat(Util.list_len(F32, tail)), sum_dtlz1(tail)))

Uses (9)

Used by (2)