NonDominatedSort.compare_cd.feas: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/non_dominated_sort.bend as NonDominatedSort Lines 114-133 of unified-nsga-iii@0.2.2.0/non_dominated_sort.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&start_line=114&end_line=133 import Base # 0 mutual, 1 a dominates b, 2 b dominates a. # Feasible (cv ≤ 0) beats infeasible. Both feasible → Pareto, # including unequal objective lengths (mutual non-domination). def compare_cd.feas( +fa: List<&2, F32>, +fb: List<&2, F32>, +cva: F32, +cvb: F32, a_feas: Bool, b_feas: Bool ) -> Nat: match a_feas b_feas: case True{} True{}: compare_pareto(fa, fb) case True{} False{}: 1n case False{} True{}: 2n case False{} False{}: compare_cd.infeas(cva, cvb, F32.is_lt(cva, cvb), F32.is_lt(cvb, cva)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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/non_dominated_sort.bend&name=compare_cd.infeas https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&name=compare_pareto