def find_pivot.go
unified-nsga-iii@0.2.2.0 · normalization.bend:282
import unified-nsga-iii@0.2.2.0/normalization.bend as Normalization
import Base
282def find_pivot.go(fuel: Nat, +mat: List<&2, List<&2, F32>>, +col: Nat, +row: Nat, +best_row: Nat, +best: F32) -> Nat:
283 match fuel:
284 case 0n:
285 best_row
286 case 1n+f:
287 +v = F32.abs(mat_get(mat, row, col))
288 find_pivot.go(
289 f,
290 mat,
291 col,
292 1n+row,
293 Bool.pick(Nat, F32.is_gt(v, best), row, best_row),
294 F32.max(v, best)
295 )