def dtlz7_f

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

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

435# f[i]=x[i] for i<M-1; f[M-1]=(1+g)*h; h = M - Σ f_i/(1+g) * (1+sin(3 π f_i)).
436def dtlz7_f(+x: List<&2, F32>, +m: Nat) -> List<&2, F32>:
437  match m:
438    case 0n:
439      Nil{}
440    case 1n+p:
441      +g = dtlz7_g(x, m)
442      +g1 = F32.add(1.0, g)
443      +h = F32.sub(F32.from_nat(m), dtlz7_h.go(x, g1, p, 0n, 0.0))
444      List.append(&2, F32, dtlz7_prefix(x, p, 0n), [F32.mul(g1, h)])

Uses (11)

Used by (1)