Trait sucds::bit_vectors::Build
source · pub trait Build {
// Required method
fn build_from_bits<I>(
bits: I,
with_rank: bool,
with_select1: bool,
with_select0: bool
) -> Result<Self>
where I: IntoIterator<Item = bool>,
Self: Sized;
}
Expand description
Interface for building a bit vector with rank/select queries.
Required Methods§
sourcefn build_from_bits<I>(
bits: I,
with_rank: bool,
with_select1: bool,
with_select0: bool
) -> Result<Self>where
I: IntoIterator<Item = bool>,
Self: Sized,
fn build_from_bits<I>( bits: I, with_rank: bool, with_select1: bool, with_select0: bool ) -> Result<Self>where I: IntoIterator<Item = bool>, Self: Sized,
Creates a new vector from input bit stream bits
.
A data structure may not support a part of rank/select queries in the default configuration. The last three flags allow to enable them if optionally supported.
Arguments
bits
: Bit stream.with_rank
: Flag to enable rank1/0.with_select1
: Flag to enable select1.with_select0
: Flag to enable select0.
Errors
An error is returned if specified queries are not supported.