Survival.niche_loop: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/survival.bend as Survival Lines 659-677 of unified-nsga-iii@0.2.2.0/survival.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&start_line=659&end_line=677 import Base import unified-nsga-iii@0.2.2.0/util.bend as Util def niche_loop(fuel: Nat, k: Nat, rows: List<&2, NRow>, +counts: List<&2, Nat>, selected: List<&2, Nat>) -> List<&2, Nat>: match fuel k rows: case 0n kk r: selected case f 0n r: selected case f kk Nil{}: selected case 1n+f 1n+krest +r0 <> +rs: +rows2 = {r0 <> rs : List<&2, NRow>} +r = pick_ref.rows(counts, rows2) +pick = pick_member.rows(counts, rows2, r) niche_loop( f, krest, drop_nrow(rows2, pick), Util.inc_at(counts, r), List.append(&2, Nat, selected, [pick]) ) Uses (8): 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=unified-nsga-iii@0.2.2.0/survival.bend&name=NRow https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=drop_nrow https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=pick_member.rows https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=pick_ref.rows https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=inc_at