Struct sdsl::RrrVector[][src]

pub struct RrrVector<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::RrrVector::<sdsl::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

Construct a new $ H_0 $-compressed bit vector.

Arguments

  • bit_vector - Uncompressed bit vector.

Load vector from file.

Arguments

  • path - File path.

Returns the length of the original bit vector.

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.

Returns an iterator over integer values of the binary string.

Arguments

  • len - Length of the binary representation of the integer. $ \mathrm{len} \in [1..64] $

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.