fn new<T: Integer + Unsigned + NumCast + Copy>(text: &[T]) -> Self {
        let n = text.len();
        let mut pos_types = BitVec::new_fill(false, n as u64);
        pos_types.set_bit(n as u64 - 1, true);

        for p in (0..n - 1).rev() {
            if text[p] == text[p + 1] {
                // if the characters are equal, the next position determines
                // the lexicographical order
                let v = pos_types.get_bit(p as u64 + 1);
                pos_types.set_bit(p as u64, v);
            } else {
                pos_types.set_bit(p as u64, text[p] < text[p + 1]);
            }
        }

        PosTypes { pos_types }
    }
/// Calculate the text position type.
/// L-type marks suffixes being lexicographically larger than their successor,
/// S-type marks the others.
/// This function fills a BitVec, with 1-bits denoting S-type
/// and 0-bits denoting L-type.
///
/// # Arguments
///
/// * `text` - the text, ending with a sentinel.
Calculate the text position type.
L-type marks suffixes being lexicographically larger than their successor,
S-type marks the others.
This function fills a BitVec, with 1-bits denoting S-type
and 0-bits denoting L-type.
Calculate the text position type . L - type marks suffixes being lexicographically larger than their successor S - type marks the others . This function fills a BitVec with 1 - bits denoting S - type and 0 - bits denoting L - type .
fn new<T: Integer + Unsigned + NumCast + Copy>(text: &[T]) -> Self {
        let n = text.len();
        let mut pos_types = BitVec::new_fill(false, n as u64);
        pos_types.set_bit(n as u64 - 1, true);
        for p in (0..n - 1).rev() {
            if text[p] == text[p + 1] {
                // if the characters are equal, the next position determines
                // the lexicographical order
                let v = pos_types.get_bit(p as u64 + 1);
                pos_types.set_bit(p as u64, v);
            } else {
                pos_types.set_bit(p as u64, text[p] < text[p + 1]);
            }
        }
        PosTypes { pos_types }
    }
fn new < T : Integer + Unsigned + NumCast + Copy > ( text : & [ T ] ) -> Self { let n = text . len ( ) ; let mut pos_types = BitVec :: new_fill ( false , n as u64 ) ; pos_types . set_bit ( n as u64 - 1 , true ) ; for p in ( 0 .. n - 1 ) . rev ( ) { if text [ p ] == text [ p + 1 ] { // if the characters are equal, the next position determines // the lexicographical order let v = pos_types . get_bit ( p as u64 + 1 ) ; pos_types . set_bit ( p as u64 , v ) ; } else { pos_types . set_bit ( p as u64 , text [ p ] < text [ p + 1 ] ) ; } } PosTypes { pos_types } }
Calculate the text position type.
Calculate the text position type .
text
&[T]
text
&[T]