nx_editdist.nx
buildroot/runtime/nx_editdist.nx
about
nx_editdist.nx -- INTEGER bounded Levenshtein for the typo/did-you-mean rung. Classic two-row DP over
byte strings (our index terms are lowercased alnum runs <= 32 bytes, so bytes == characters here).
ed_bounded returns the edit distance, or bound+1 the moment it can prove distance > bound (early-out:
the length gap alone decides most rejects at O(1)). No floats, no allocation beyond two 40-cell rows.
license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_docportal_search_seg.nxnx_editdist_gate.nx
structs
| none |
consts
| none |
functions
| 8 | func ed_bounded(a: *u8, an: i64, b: *u8, bn: i64, bound: i64) -> i64 |