/// Find all matches between pattern and text with up to k errors.
/// Matches are returned as an iterator over pairs of end position and distance.
Find all matches between pattern and text with up to k errors.
Matches are returned as an iterator over pairs of end position and distance.
Find all matches between pattern and text with up to k errors . Matches are returned as an iterator over pairs of end position and distance .
pub fn find_all_end<'a, C, T>(
        &'a mut self,
        pattern: TextSlice<'a>,
        text: T,
        k: usize,
    ) -> Matches<'_, F, C, T::IntoIter>
    where
        C: Borrow<u8>,
        T: IntoIterator<Item = C>,
    {
        let m = pattern.len();
        self.D[0].clear();
        self.D[0].extend(repeat(k + 1).take(m + 1));
        self.D[1].clear();
        self.D[1].extend(0..=m);
        Matches {
            ukkonen: self,
            pattern,
            text: text.into_iter().enumerate(),
            lastk: min(k, m),
            m,
            k,
        }
    }
pub fn find_all_end < ' a , C , T > ( & ' a mut self , pattern : TextSlice < ' a > , text : T , k : usize , ) -> Matches < ' _ , F , C , T :: IntoIter > where C : Borrow < u8 > , T : IntoIterator < Item = C > , { let m = pattern . len ( ) ; self . D [ 0 ] . clear ( ) ; self . D [ 0 ] . extend ( repeat ( k + 1 ) . take ( m + 1 ) ) ; self . D [ 1 ] . clear ( ) ; self . D [ 1 ] . extend ( 0 ..= m ) ; Matches { ukkonen : self , pattern , text : text . into_iter ( ) . enumerate ( ) , lastk : min ( k , m ) , m , k , } }
Find all matches between pattern and text with up to k errors.
Find all matches between pattern and text with up to k errors .
&'a mut self
pattern
TextSlice<'a>
text
T
k
usize