Expand description
Classical string algorithms.
This module collects combinatorial string algorithms that operate on raw
byte sequences, complementing the edit-distance routines in
crate::distance and the alignment code in crate::alignment.
manacher— Manacher’s 1975 linear-time longest-palindromic-substring algorithm, exposing the full per-center radius array.suffix_automaton— the suffix automaton (DAWG) of Blumer et al. (1985) with Crochemore’s online clone-on-split construction, supporting substring membership, distinct-substring counting, occurrence counting, and longest common substring.z_algorithm— Gusfield’s 1997 Z-array in linear time via the Z-box, plus linear-time exact pattern matching through theP $ Tconstruction.suffix_array— the suffix array via SA-IS (Nong–Zhang–Chan 2009) with Kasai’s LCP array (2001) and binary-search pattern matching.fm_index— the Burrows–Wheeler transform (1994) and FM-index (Ferragina–Manzini 2000) built on the suffix array, with invertible BWT and backward-searchcount/locate.
Re-exports§
pub use fm_index::FmIndex;pub use manacher::Manacher;pub use manacher::longest_palindrome_str;pub use manacher::manacher;pub use suffix_array::SuffixArray;pub use suffix_automaton::SuffixAutomaton;pub use suffix_automaton::longest_common_substring;pub use z_algorithm::z_array;pub use z_algorithm::z_search;
Modules§
- fm_
index - Burrows–Wheeler transform and FM-index with backward search.
- manacher
- Manacher’s algorithm for longest palindromic substring in linear time.
- suffix_
array - Suffix array (SA-IS) with Kasai’s LCP array and SA binary-search.
- suffix_
automaton - Suffix automaton (directed acyclic word graph, DAWG).
- z_
algorithm - Gusfield’s Z-algorithm: the Z-array in linear time, with exact matching.