pub struct SideLocus {
pub side_byte_off: u64,
pub side_num: u64,
pub char_off: u32,
pub by: i32,
pub bp: i32,
}Expand description
Position within the FM-index
This corresponds to the SideLocus struct in the C++ code.
The FM-index is organized into “sides” of fixed size for
efficient cache access.
Fields§
§side_byte_off: u64Offset of side within ebwt[] (in bytes)
side_num: u64Index of side
char_off: u32Character offset within side (0 to sideBwtLen-1)
by: i32Byte within side (0 to sideBwtSz-1)
bp: i32Bit-pair within byte (0-3)
Implementations§
Source§impl SideLocus
impl SideLocus
Sourcepub fn init_from_row(&mut self, row: u64, ep: &EbwtParams, ebwt: &[u8])
pub fn init_from_row(&mut self, row: u64, ep: &EbwtParams, ebwt: &[u8])
Sourcepub fn init_from_top_bot(
top: u64,
bot: u64,
ep: &EbwtParams,
ebwt: &[u8],
) -> (Self, Self)
pub fn init_from_top_bot( top: u64, bot: u64, ep: &EbwtParams, ebwt: &[u8], ) -> (Self, Self)
Initialize two SideLocus objects from a top/bot pair
This is an optimized version that uses the result from one call to initFromRow to possibly avoid a second call.
Sourcepub fn prefetch_from_row(row: u64, ep: &EbwtParams, ebwt: &[u8])
pub fn prefetch_from_row(row: u64, ep: &EbwtParams, ebwt: &[u8])
Prefetch cache lines for a given row
Sourcepub fn next_side(&mut self, ep: &EbwtParams)
pub fn next_side(&mut self, ep: &EbwtParams)
Transform this SideLocus to refer to the next side
Sourcepub fn is_valid(&self, _ep: &EbwtParams) -> bool
pub fn is_valid(&self, _ep: &EbwtParams) -> bool
Check if this SideLocus is valid with respect to given parameters
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Invalidate this SideLocus (make it look like an invalid one)
Sourcepub fn side<'a>(&self, ebwt: &'a [u8]) -> &'a [u8] ⓘ
pub fn side<'a>(&self, ebwt: &'a [u8]) -> &'a [u8] ⓘ
Get a read-only pointer to the beginning of the top side
Sourcepub fn byte_offset(&self) -> u64
pub fn byte_offset(&self) -> u64
Get the actual byte offset in the mmapped data