Normalization.col_min.go: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/normalization.bend as Normalization Lines 35-50 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=35&end_line=50 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 # Column min/max are associative. Mid-split then vec_min / vec_max. def col_min.go(+fuel: Nat, pop: List<&2, Ind.Individual>) -> List<&2, F32>: match fuel pop: case 0n Nil{}: Nil{} case 0n ind <> xs: Util.vec_min(Ind.objectives(ind), col_min.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_min.go(p, List.take(&2, Ind.Individual, all, mid)) col_min.go(p, List.drop(&2, Ind.Individual, all, mid)) Util.vec_min(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_min