Skip to main content

edit_distance

Function edit_distance 

Source
fn edit_distance(a: &str, b: &str) -> usize
Expand description

Levenshtein edit distance between a and b over their bytes.

Callers only pass reference-alphabet labels (the parsed reference name and is_reference_label candidates), all ASCII, so byte distance equals character distance while staying allocation-light: one reusable row, where row[j] holds the distance from the processed prefix of a to b[..j].