def expand_band
bend-edit-distance@0.2.2.0 · src/Myers.bend:312
import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers
import Base
312def expand_band(entries: List<&2, BandEntry>, rest: List<&2, Peq>, +score: U32,
313 carry: Carry, +symbol: U32, first: Nat, +maximum: Nat,
314 length: Nat, target_length: Nat, column: Nat,
315 work: Nat, expand: Bool) -> BandStep:
316 match rest carry expand:
317 case +profile <> tail Carry{+positive, +negative} True{}:
318 previous = U32.add(U32.sub(U32.add(score, negative), positive), 32)
319 expand_band.step(calculate_block(Block{4294967295, 0, previous},
320 peq_get(profile, symbol, U32.is_ne(U32.and(symbol, 1), 0)), Carry{positive, negative}),
321 entries, profile, tail, first, maximum, length, target_length, column, work)
322 case _ _ _:
323 reduce_band(entries, rest, first, maximum, length, target_length, column, work)