Struct biodivine_lib_param_bn::biodivine_std::bitvector::BitVector58
source · [−]pub struct BitVector58(u64);
Expand description
A BitVector
implementation that uses u64
as the underlying representation and
can therefore hold only up-to 58 values (remaining 6 bits store the vector length).
Should be pretty fast though.
BitVector58
is also Copy
, because it is small enough to pass by value.
Tuple Fields
0: u64
Implementations
sourceimpl BitVector58
impl BitVector58
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 BitVector58
impl BitVector for BitVector58
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 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 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 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 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 BitVector58
impl Clone for BitVector58
sourcefn clone(&self) -> BitVector58
fn clone(&self) -> BitVector58
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 BitVector58
impl Debug for BitVector58
sourceimpl Display for BitVector58
impl Display for BitVector58
sourceimpl Hash for BitVector58
impl Hash for BitVector58
sourceimpl PartialEq<BitVector58> for BitVector58
impl PartialEq<BitVector58> for BitVector58
sourcefn eq(&self, other: &BitVector58) -> bool
fn eq(&self, other: &BitVector58) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BitVector58) -> bool
fn ne(&self, other: &BitVector58) -> bool
This method tests for !=
.
impl Copy for BitVector58
impl Eq for BitVector58
impl StructuralEq for BitVector58
impl StructuralPartialEq for BitVector58
Auto Trait Implementations
impl RefUnwindSafe for BitVector58
impl Send for BitVector58
impl Sync for BitVector58
impl Unpin for BitVector58
impl UnwindSafe for BitVector58
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