Myers.adaptive_search: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers Lines 407-418 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=407&end_line=418 import Base import bend-edit-distance@0.2.2.0/EdlibTypes.bend as E def adaptive_search(fuel: Nat, +target: String, +profiles: List<&2, Peq>, +length: Nat, +target_length: Nat, +maximum: Nat, +padding: Nat, +blocks: Nat, +columns: Nat, +attempts: Nat) -> Search: match fuel: case 0n: Search{E.NotFound{}, blocks, columns, attempts} case 1n+p: adaptive_search.result(band_attempt(target, profiles, length, target_length, maximum, padding), blocks, columns, attempts, bs => cs => adaptive_search(p, target, profiles, length, target_length, Nat.min(target_length, Nat.mul(maximum, 2n)), padding, bs, cs, 1n+attempts)) Uses (10): 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.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=String https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=EditDistance 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.result https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=band_attempt