Struct wavelet_matrix::WaveletMatrix
[−]
[src]
pub struct WaveletMatrix { /* fields omitted */ }
WaveletMatrix supports various near-O(1) queries on the sequence of integers.
Methods
impl WaveletMatrix
[src]
fn new(vals: &Vec<u64>) -> WaveletMatrix
[src]
Create a new WaveletMatrix struct from a input Vec
fn len(&self) -> usize
[src]
Returns the length of T
fn lookup(&self, pos: usize) -> u64
[src]
Returns the value T[pos]
fn count(&self, pos_range: Range<usize>, value: u64) -> usize
[src]
Returns the number of the element which satisfies e == value
included in A[pos_range]
fn count_lt(&self, pos_range: Range<usize>, value: u64) -> usize
[src]
Returns the number of the element which satisfies e < value
included in A[pos_range]
fn count_gt(&self, pos_range: Range<usize>, value: u64) -> usize
[src]
Returns the number of the element which satisfies e > value
included in A[pos_range]
fn count_prefix(
&self,
pos_range: Range<usize>,
value: u64,
ignore_bit: u8
) -> usize
[src]
&self,
pos_range: Range<usize>,
value: u64,
ignore_bit: u8
) -> usize
Returns the number of the element which satisfies (e >> ignore_bit) == (val >> ignore_bit)
included in A[pos_range]
fn count_range(&self, pos_range: Range<usize>, val_range: Range<u64>) -> usize
[src]
Returns the number of the element which satisfies val_range.start <= e < val_range.end
included in A[pos_range]
fn rank(&self, pos: usize, val: u64) -> usize
[src]
Returns the number of val found in T[0..pos].
The range specified is half open, i.e. [0, pos).
fn select(&self, rank: usize, val: u64) -> usize
[src]
Return the position of (rank+1)-th val in T.
If no match has been found, it returns the length of self.
Trait Implementations
impl Debug for WaveletMatrix
[src]
impl SpaceUsage for WaveletMatrix
[src]
fn is_stack_only() -> bool
[src]
Is the size of this type known statically? Read more
fn heap_bytes(&self) -> usize
[src]
Calculates the heap portion of the size of an object. Read more
fn total_bytes(&self) -> usize
[src]
Computes the size of the receiver in bytes. Read more
fn stack_bytes() -> usize
[src]
Calculates the stack portion of the size of this type. Read more