def near_lim

unified-nsga-iii@0.2.2.0 · survival.bend:536

import unified-nsga-iii@0.2.2.0/survival.bend as Survival
import Base

536# Uniform inNiche[rng.Next] (C# non-empty + rng) lets far-from-ray last-front
537# junk into a niche. With this LCG that pile-up dominates ZDT2's concave
538# front (x0 → 0). Draw extras only among members within 2×best+0.01 of
539# the ray (first assignment to a niche stays closest).
540def near_lim(+best: F32) -> F32:
541  F32.add(F32.mul(best, 2.0), 0.01)

Uses (3)

Used by (2)