Normalization.col_max.go: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/normalization.bend as Normalization Lines 55-69 of unified-nsga-iii@0.2.2.0/normalization.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&start_line=55&end_line=69 import Base import unified-nsga-iii@0.2.2.0/individual.bend as Ind import unified-nsga-iii@0.2.2.0/util.bend as Util def col_max.go(+fuel: Nat, pop: List<&2, Ind.Individual>) -> List<&2, F32>: match fuel pop: case 0n Nil{}: Nil{} case 0n ind <> xs: Util.vec_max(Ind.objectives(ind), col_max.go(0n, xs)) case 1n+p Nil{}: Nil{} case 1n+p ind <> Nil{}: Ind.objectives(ind) case 1n+p h <> t: +all = {h <> t : List<&2, Ind.Individual>} +mid = Nat.div(Util.list_len(Ind.Individual, all), 2n) lo hi = col_max.go(p, List.take(&2, Ind.Individual, all, mid)) col_max.go(p, List.drop(&2, Ind.Individual, all, mid)) Util.vec_max(lo, hi) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/individual.bend&name=Individual https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/individual.bend&name=objectives https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=list_len https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=vec_max