Skip to main content

FmIndex

Trait FmIndex 

Source
pub trait FmIndex {
    // Required methods
    fn exact_match(&self, pattern: &[Nuc]) -> AlignResult<Vec<usize>>;
    fn len(&self) -> usize;
    fn bwt(&self, pos: usize) -> AlignResult<NucPair>;
    fn rank(&self, c: Nuc, pos: usize) -> AlignResult<usize>;
    fn select(&self, c: Nuc, k: usize) -> AlignResult<usize>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

FM-index trait for generic operations

Required Methods§

Source

fn exact_match(&self, pattern: &[Nuc]) -> AlignResult<Vec<usize>>

Exact match search - return all positions matching the pattern

Source

fn len(&self) -> usize

Get the length of the indexed text

Source

fn bwt(&self, pos: usize) -> AlignResult<NucPair>

Get forward BWT character at position

Source

fn rank(&self, c: Nuc, pos: usize) -> AlignResult<usize>

Rank operation - count occurrences of character up to position

Source

fn select(&self, c: Nuc, k: usize) -> AlignResult<usize>

Select operation - find position of k-th occurrence of character

Provided Methods§

Source

fn is_empty(&self) -> bool

Check if the index is empty

Implementors§