Module bio::pattern_matching::bom

source ·
Expand description

Backward oracle matching algorithm. Best-case complexity: O(n / m) with pattern of length m and text of length n. Worst case complexity: O(n * m).

§Example

use bio::pattern_matching::bom::BOM;
let text = b"ACGGCTAGGAAAAAGACTGAGGACTGAAAA";
let pattern = b"GAAAA";
let bom = BOM::new(pattern);
let occ: Vec<usize> = bom.find_all(text).collect();
assert_eq!(occ, [8, 25]);

Structs§

  • Backward oracle matching algorithm.
  • Iterator over start positions of matches.