def semiglobal_carry

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

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

451# Directional modes never swap query and target. The initial vertical scores
452# are i in both modes, while the top horizontal difference is +1 for SHW and
453# 0 for HW. NW's length/remaining-target band bounds do not apply here.
454def semiglobal_carry(mode: E.Mode) -> Carry:
455  match mode:
456    case E.HW{}:
457      Carry{0, 0}
458    case _:
459      Carry{1, 0}

Uses (2)

Used by (1)