pub struct OZBCBitmap { /* private fields */ }
Trait Implementations§
Source§impl BitAnd for &OZBCBitmap
Impl BitAnd
running “logical and” bit operation between 2 bitmaps.
impl BitAnd for &OZBCBitmap
Impl BitAnd
running “logical and” bit operation between 2 bitmaps.
Source§type Output = OZBCBitmap
type Output = OZBCBitmap
The resulting type after applying the
&
operator.Source§fn bitand(self, b2: Self) -> OZBCBitmap
fn bitand(self, b2: Self) -> OZBCBitmap
Performs the
&
operation. Read moreSource§impl Bitmap for OZBCBitmap
Impl Bitmap
to allow to use OZBCBitmap in [BitmapIndex
].
impl Bitmap for OZBCBitmap
Impl Bitmap
to allow to use OZBCBitmap in [BitmapIndex
].
Source§fn new() -> OZBCBitmap
fn new() -> OZBCBitmap
Return new empty bitmap.
Source§fn set(&mut self, i: u32)
fn set(&mut self, i: u32)
Set the ith bit (starting from zero). You must set the bitmap in increasing
order otherwise nothing happend:
set(0), set(16), set(1000)
is the same of set(0), set(16), set(1000), set(50)
.
§Example
use bitrush_index::OZBCBitmap;
use bitrush_index::Bitmap;
fn main() {
let mut b0 = OZBCBitmap::new();
let mut b1 = b0.clone();
let values = [0, 1, 100, 100000, 2, 100001];
let values_ok = [0, 1, 100, 100000, 100001];
for val in values.iter() {
b0.set(*val);
}
for val in values_ok.iter() {
b1.set(*val);
}
assert_eq!(b0, b1);
}
Source§fn unroll_bitmap(&self) -> Vec<u32>
fn unroll_bitmap(&self) -> Vec<u32>
Return a vector with all positions of set bit.
Source§impl Clone for OZBCBitmap
impl Clone for OZBCBitmap
Source§fn clone(&self) -> OZBCBitmap
fn clone(&self) -> OZBCBitmap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OZBCBitmap
Impl Debug
trait printing each bit of every bitmap words.
impl Debug for OZBCBitmap
Impl Debug
trait printing each bit of every bitmap words.
Source§impl PartialEq for OZBCBitmap
impl PartialEq for OZBCBitmap
impl StructuralPartialEq for OZBCBitmap
Auto Trait Implementations§
impl Freeze for OZBCBitmap
impl RefUnwindSafe for OZBCBitmap
impl Send for OZBCBitmap
impl Sync for OZBCBitmap
impl Unpin for OZBCBitmap
impl UnwindSafe for OZBCBitmap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more