Myers.search_profiles: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers Lines 420-429 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=420&end_line=429 import Base import bend-edit-distance@0.2.2.0/EdlibTypes.bend as E def search_profiles(target: String, profiles: List<&2, Peq>, +length: Nat, +target_length: Nat, threshold: E.Threshold) -> Search: match threshold: case E.MaxDistance{maximum}: band_attempt(target, profiles, length, target_length, Nat.min(maximum, target_length), Nat.sub(Nat.mul(ceil_div(length, 32n), 32n), length)) case E.Unlimited{}: adaptive_search(1n+target_length, target, profiles, length, target_length, Nat.min(target_length, Nat.max(32n, Nat.sub(target_length, length))), Nat.sub(Nat.mul(ceil_div(length, 32n), 32n), length), 0n, 0n, 0n) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.max https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.min https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub 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=Threshold https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=Peq https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=Search https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=adaptive_search https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=band_attempt https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=ceil_div