def offs_loop

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

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

377def offs_loop(
378  fuel: Nat,
379  hold: OHold,
380  +parents: List<&2, Ind.Individual>,
381  +prob: Prob.Problem,
382  +mut_p: F32,
383  +elim: Bool,
384  +n: Nat
385) -> Rng.State & List<&2, Ind.Individual>:
386  match fuel hold:
387    case 0n h:
388      offs_done(parents, prob, mut_p, elim, n, h)
389    case 1n+f OH{0n, pair, rng, acc, seen}:
390      offs_have(OH{0n, pair, rng, acc, seen})
391    case 1n+f OH{1n+k, pair, rng, acc, seen}:
392      offs_loop(f, offs_next(parents, prob, mut_p, elim, OH{1n+k, pair, rng, acc, seen}), parents, prob, mut_p, elim, n)

Uses (12)

Used by (1)