pub struct ArrayBitVector {
len: usize,
values: BitVector,
}
Expand description
A BitVector
implementation that uses the explicit implementation from the bitvector
crate.
Fields
len: usize
values: BitVector
Implementations
sourceimpl ArrayBitVector
impl ArrayBitVector
sourcefn check_access(&self, index: usize)
fn check_access(&self, index: usize)
(internal) Check if the given index is valid in this BitVector
- panic otherwise.
Trait Implementations
sourceimpl BitVector for ArrayBitVector
impl BitVector for ArrayBitVector
sourcefn empty(len: usize) -> Self
fn empty(len: usize) -> Self
Create a new BitVector
with the given length. Can panic if this implementation
does not support the specified length. Once created, the length cannot be changed. Read more
sourcefn ones(&self) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn ones(&self) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
A vector of the indices of this BitVector
which are set.
sourcefn max_length() -> usize
fn max_length() -> usize
If a BitVector
implementation cannot handle arbitrary vector lengths, it can use this
method to declare the largest bitvector it can handle. Read more
sourcefn from_ones(len: usize, items: Vec<usize>) -> Self
fn from_ones(len: usize, items: Vec<usize>) -> Self
Create a new BitVector
which contains items
specified in the given vector.
sourcefn values(&self) -> Vec<bool>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn values(&self) -> Vec<bool>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Return a vector of the values in this BitVector
.
sourcefn zeros(&self) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn zeros(&self) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
A vector of the indices of this BitVector
which are not set.
sourcefn display(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn display(&self, f: &mut Formatter<'_>) -> Result<(), Error>
A helper method for Display
trait implementations for all variants of BitVector
. Please
use this method (or an equivalent display format) for all Display
implementations of
BitVector
s. Read more
sourcefn from_bool_vector(items: Vec<bool>) -> Self
fn from_bool_vector(items: Vec<bool>) -> Self
A helper method for converting a vector of Booleans into a BitVector
. Useful when
implementing From<Vec<bool>>
. Read more
fn is_empty(&self) -> bool
sourceimpl Clone for ArrayBitVector
impl Clone for ArrayBitVector
sourcefn clone(&self) -> ArrayBitVector
fn clone(&self) -> ArrayBitVector
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ArrayBitVector
impl Debug for ArrayBitVector
sourceimpl Display for ArrayBitVector
impl Display for ArrayBitVector
sourceimpl PartialEq<ArrayBitVector> for ArrayBitVector
impl PartialEq<ArrayBitVector> for ArrayBitVector
sourcefn eq(&self, other: &ArrayBitVector) -> bool
fn eq(&self, other: &ArrayBitVector) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ArrayBitVector) -> bool
fn ne(&self, other: &ArrayBitVector) -> bool
This method tests for !=
.
impl Eq for ArrayBitVector
impl StructuralPartialEq for ArrayBitVector
Auto Trait Implementations
impl RefUnwindSafe for ArrayBitVector
impl Send for ArrayBitVector
impl Sync for ArrayBitVector
impl Unpin for ArrayBitVector
impl UnwindSafe for ArrayBitVector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more