PolynomialMutation.start_or_copy: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/polynomial_mutation.bend as PolynomialMutation Lines 163-178 of unified-nsga-iii@0.2.2.0/polynomial_mutation.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/polynomial_mutation.bend&start_line=163&end_line=178 import Base import unified-nsga-iii@0.2.2.0/individual.bend as Ind import unified-nsga-iii@0.2.2.0/bounds.bend as Bounds import unified-nsga-iii@0.2.2.0/rng.bend as Rng # p=0 leaves the decision vector unchanged before any NextDouble. # Matches C# when per-variable probability is 0 (every draw is > 0). def start_or_copy( +eta: F32, +box: Bounds.Box, rng: Rng.State, ind: Ind.Individual, +p: F32, n: Nat, zero: Bool ) -> Rng.State & Ind.Individual: match zero: case True{}: (rng, ind) case False{}: start(eta, box, rng, ind, p, n) Uses (9): 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=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/bounds.bend&name=Box 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/polynomial_mutation.bend&name=start https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=State