Myers.hw_start: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers Lines 582-589 of bend-edit-distance@0.2.2.0/src/Myers.bend: https://jend.leeeet.dev/read.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&start_line=582&end_line=589 import Base import bend-edit-distance@0.2.2.0/EdlibTypes.bend as E import bend-edit-distance@0.2.2.0/src/Alignment.bend as A # Edlib selects the LAST optimal reverse-SHW end, hence the earliest start # for each forward end. Preserve the special forward end -1 with start 0. def hw_start(+end: Nat, reverse_location: A.Location) -> A.Location: match reverse_location: case A.Location{E.BeforeStart{}, _}: A.Location{E.Position{end}, 1n+end} case A.Location{E.Position{reverse_end}, _}: A.Location{E.Position{end}, Nat.sub(end, reverse_end)} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=Coordinate https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Alignment.bend&name=Location