[−][src]Struct suffix_array::SuffixArray
Suffix array for byte string.
Methods
impl<'a> SuffixArray<'a>
[src]
pub fn new(s: &'a [u8]) -> Self
[src]
pub fn set(&mut self, s: &'a [u8])
[src]
pub fn fit(&mut self)
[src]
pub fn len(&self) -> usize
[src]
Length of the underlying byte string.
pub fn is_empty(&self) -> bool
[src]
Test if the underlying byte string is empty.
pub fn into_parts(self) -> (&'a [u8], Vec<u32>)
[src]
Take out the suffix array and its corresponding byte string.
pub fn from_parts(s: &'a [u8], sa: Vec<u32>) -> Option<Self>
[src]
Compose existed suffix array and its corresponding byte string together, and checks the integrity.
pub unsafe fn unchecked_from_parts(s: &'a [u8], sa: Vec<u32>) -> Self
[src]
Compose existed suffix array and its corresponding byte string together without integrity check.
pub fn enable_buckets(&mut self)
[src]
Enable bucket pointers to speed up large amount of pattern searching.
The overhead is about 257 KiB.
pub fn contains(&self, pat: &[u8]) -> bool
[src]
Test if it contains the given pattern.
pub fn search_all(&self, pat: &[u8]) -> &[u32]
[src]
Search for all the unsorted occurrence of given pattern (can overlap).
pub fn search_lcp(&self, pat: &[u8]) -> Range<usize>
[src]
Search for a sub-string that has the longest common prefix of the given pattern.
Trait Implementations
impl<'a> AsRef<[u8]> for SuffixArray<'a>
[src]
impl<'a> Clone for SuffixArray<'a>
[src]
fn clone(&self) -> SuffixArray<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> From<SuffixArray<'a>> for Vec<u32>
[src]
fn from(sa: SuffixArray<'a>) -> Vec<u32>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for SuffixArray<'a>
impl<'a> Send for SuffixArray<'a>
impl<'a> Sync for SuffixArray<'a>
impl<'a> Unpin for SuffixArray<'a>
impl<'a> UnwindSafe for SuffixArray<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,