Problems.osy_f: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/problems.bend as Problems Lines 532-549 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=532&end_line=549 import Base import unified-nsga-iii@0.2.2.0/util.bend as Util # C# OsyProblem. f0 negates the weighted squares (x5 is not in f0). def osy_f(+x: List<&2, F32>) -> List<&2, F32>: +x0 = Util.get_f32(x, 0n) +x1 = Util.get_f32(x, 1n) +x2 = Util.get_f32(x, 2n) +x3 = Util.get_f32(x, 3n) +x4 = Util.get_f32(x, 4n) +pen = F32.add( F32.mul(25.0, F32.square(F32.sub(x0, 2.0))), F32.add( F32.square(F32.sub(x1, 2.0)), F32.add( F32.square(F32.sub(x2, 1.0)), F32.add(F32.square(F32.sub(x3, 4.0)), F32.square(F32.sub(x4, 1.0))) ) ) ) F32.neg(pen) <> [sum_sq(x)] 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.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.neg https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.square 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=unified-nsga-iii@0.2.2.0/problems.bend&name=sum_sq https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=get_f32