def u_loop

unified-nsga-iii@0.2.2.0 · algorithm.bend:351

import unified-nsga-iii@0.2.2.0/algorithm.bend as Algorithm
import Base
import unified-nsga-iii@0.2.2.0/individual.bend as Ind
import unified-nsga-iii@0.2.2.0/rng.bend as Rng
import unified-nsga-iii@0.2.2.0/problems.bend as Prob

351def u_loop(
352  fuel: Nat,
353  hold: UHold,
354  +parents: List<&2, Ind.Individual>,
355  +prob: Prob.Problem,
356  +mut_p: F32,
357  +elim: Bool
358) -> Rng.State & List<&2, Ind.Individual>:
359  match fuel hold:
360    case 0n h:
361      u_fallback(parents, prob, mut_p, h)
362    case 1n+f UH{rng, acc, seen, 0n}:
363      u_have(UH{rng, acc, seen, 0n})
364    case 1n+f UH{rng, acc, seen, 1n+k}:
365      u_loop(f, u_next(parents, prob, mut_p, elim, UH{rng, acc, seen, 1n+k}), parents, prob, mut_p, elim)

Uses (12)

Used by (1)