Myers.edlib_align: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers Lines 708-719 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=708&end_line=719 import Base import bend-edit-distance@0.2.2.0/src/Sequence.bend as S 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 def edlib_align(query: String, target: String, config: E.AlignConfig) -> E.AlignResult: match query target config: case SNil{} _ _: A.empty_result("", target, config) case SCon{h, t} SNil{} _: A.empty_result(SCon{h, t}, "", config) case +q +t E.AlignConfig{E.NW{}, task, threshold, +pairs, format}: +qn +tn = S.length(q) S.length(t) nw_result(q, t, task, pairs, format, E.end_coordinate(tn), search_distance(search_shorter(q, t, qn, tn, threshold, Nat.is_le(qn, tn), pairs))) case +q +t E.AlignConfig{mode, task, threshold, pairs, format}: semiglobal_align(q, t, mode, task, threshold, pairs, format) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=AlignConfig https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=AlignResult https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=end_coordinate https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Alignment.bend&name=empty_result https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=nw_result https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=search_distance https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=search_shorter https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=semiglobal_align https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Sequence.bend&name=length