def advance_band

bend-edit-distance@0.2.2.0 · src/Myers.bend:217

import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers
import Base

217def advance_band(entries: List<&2, BandEntry>, +symbol: U32,
218                 hin: Carry, +bottom: Nat) -> UpdatedBand:
219  match entries:
220    case Nil{}:
221      UpdatedBand{Nil{}, 0, Carry{1, 0}, bottom}
222    case BandEntry{+profile, block} <> Nil{}:
223      advance_band.last(calculate_block(block,
224        peq_get(profile, symbol, U32.is_ne(U32.and(symbol, 1), 0)), hin), profile, bottom)
225    case BandEntry{+profile, block} <> tail:
226      advance_band.next(calculate_block(block,
227        peq_get(profile, symbol, U32.is_ne(U32.and(symbol, 1), 0)), hin), profile,
228        carry => advance_band(tail, symbol, carry, Nat.add(bottom, 32n)))

Uses (13)

Used by (2)