Struct sdsl::bit_vectors::RrrVector [−][src]
pub struct RrrVector<'a, BlockStore, const BLOCK_SIZE: u16, const RANK_STORE_FREQ: u16> where
BlockStore: Code, { /* fields omitted */ }
Expand description
$ H_0 $-compressed bit vector representation.
Arguments
BlockStore
- A random access integer vector or wavelet tree used to store the block types.BLOCK_SIZE
- Size of a basic block.RANK_STORE_FREQ
- A rank sample value is stored before every t_k-th basic block.
References
- Rasmus Pagh Low redundancy in dictionaries with O(1) worst case lookup time Technical Report 1998. ftp://ftp.cs.au.dk/BRICS/Reports/RS/98/28/BRICS-RS-98-28.pdf, Section 2.
- Rajeev Raman, V. Raman and S. Srinivasa Rao Succinct Indexable Dictionaries with Applications to representations of k-ary trees and multi-sets. SODA 2002.
- Francisco Claude, Gonzalo Navarro: Practical Rank/Select Queries over Arbitrary Sequences. SPIRE 2008: 176-187
- On the fly-decoding and encoding was discovered in; Gonzalo Navarro, Eliana Providel: Fast, Small, Simple Rank/Select on Bitmaps. SEA 2012
Example
ⓘ
let bv = sdsl::bit_vector! {1, 1, 0, 1}; let rv = sdsl::bit_vectors::RrrVector::<sdsl::int_vectors::IntVector<0>, 10, 2>::new(&bv)?; let result = rv.get_int(1, 3); let expected = 5; assert_eq!(result, expected);
For further examples see here.
Implementations
Get the i-th element of the original bit vector.
Arguments
index
- An index in range $ [0, \mathrm{len}()) $.
Get the integer value of the binary string of length len
starting at position index
.
Arguments
index
- Starting index of the binary representation of the integer. $ \mathrm{index} + \mathrm{len} -1 \in [0..\mathrm{size}()-1] $len
- Length of the binary representation of the integer. $ \mathrm{len} \in [1..64] $
Returns an iterator over the original bit vector values.
Trait Implementations
Auto Trait Implementations
impl<'a, BlockStore, const BLOCK_SIZE: u16, const RANK_STORE_FREQ: u16> RefUnwindSafe for RrrVector<'a, BlockStore, BLOCK_SIZE, RANK_STORE_FREQ> where
BlockStore: RefUnwindSafe,
impl<'a, BlockStore, const BLOCK_SIZE: u16, const RANK_STORE_FREQ: u16> !Send for RrrVector<'a, BlockStore, BLOCK_SIZE, RANK_STORE_FREQ>
impl<'a, BlockStore, const BLOCK_SIZE: u16, const RANK_STORE_FREQ: u16> !Sync for RrrVector<'a, BlockStore, BLOCK_SIZE, RANK_STORE_FREQ>
impl<'a, BlockStore, const BLOCK_SIZE: u16, const RANK_STORE_FREQ: u16> Unpin for RrrVector<'a, BlockStore, BLOCK_SIZE, RANK_STORE_FREQ>
impl<'a, BlockStore, const BLOCK_SIZE: u16, const RANK_STORE_FREQ: u16> UnwindSafe for RrrVector<'a, BlockStore, BLOCK_SIZE, RANK_STORE_FREQ> where
BlockStore: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self