def band_keep_last

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

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

230# Edlib's conservative Ukkonen block bounds, rearranged so every term is
231# nonnegative Nat arithmetic. Rows/columns here count consumed characters.
232# The 62/63 constants adapt 2*WORD_SIZE-2/-1 from the pinned 64-bit code.
233def band_keep_last(+score: Nat, bottom: Nat, +maximum: Nat,
234                   length: Nat, target_length: Nat, column: Nat) -> Bool:
235  Bool.and(Nat.is_lt(score, Nat.add(maximum, 32n)),
236    Nat.is_le(Nat.add(Nat.add(bottom, score), target_length),
237      Nat.add(Nat.add(Nat.add(maximum, length), column), 63n)))

Uses (6)

Used by (1)