Normalization.normalize_nd.body: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/normalization.bend as Normalization Lines 480-493 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=480&end_line=493 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 normalize_nd.body(+ideal0: List<&2, F32>, +worst0: List<&2, F32>, +ext0: List<&2, List<&2, F32>>, +pop: List<&2, Ind.Individual>, nd: List<&2, Nat>) -> State & List<&2, List<&2, F32>>: +mn = col_min(pop) +mx = col_max(pop) +ideal = merge_ideal(ideal0, mn) +worst = merge_worst(worst0, mx) +nd_use = nd_or_all(nd, Util.list_len(Ind.Individual, pop)) +front = col_max_idx(pop, nd_use) +cand = List.append(&2, List<&2, F32>, ext0, gather_objs(pop, nd_use)) +m = n_obj_pop(pop) +ext = pick_extremes(cand, ideal, m) +nadir0 = nadir_from_maybe(try_intercepts(ext, ideal), ideal, worst, front) +nadir1 = fallback_pop(nadir0, ideal, mx) +nadir = fallback_unit(nadir1, ideal) (MkState{m, ideal, worst, nadir, spans_or_one(nadir, ideal), ext}, map_norm(ideal, nadir, pop)) Uses (24): 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.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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/normalization.bend&name=State https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=col_max https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=col_max_idx https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=col_min https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=fallback_pop https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=fallback_unit https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=gather_objs https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=map_norm https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=merge_ideal https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=merge_worst https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=n_obj_pop https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=nadir_from_maybe https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=nd_or_all https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=pick_extremes https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=spans_or_one https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/normalization.bend&name=try_intercepts https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=list_len