sigalign_core/reference/pattern_index/
mod.rs

1/*!
2Provides the `PatternIndex` and its basic implementations.
3*/
4pub trait PatternIndex: Sized {
5    type Option;
6    type BuildError: std::error::Error;
7
8    /// Create a new `PatternIndex` instance with the given concatenated sequence.
9    fn new(concatenated_sequence : Vec<u8>, option: Self::Option) -> Result<Self, Self::BuildError>;
10    /// Get sorted positions of the given pattern in concatenated sequence.
11    fn get_sorted_positions(&self, pattern: &[u8]) -> Vec<u32>;
12}