pub trait Transformation {
// Required methods
fn bit(parent: &BitVector, index: usize) -> bool;
fn word(parent: &BitVector, index: usize) -> u64;
unsafe fn word_unchecked(parent: &BitVector, index: usize) -> u64;
fn count_ones(parent: &BitVector) -> usize;
fn one_iter(parent: &BitVector) -> OneIter<'_, Self> ⓘ;
}Expand description
An implicit transformation of BitVector into another vector of the same length.
Types that implement this trait can be used as parameters for SelectSupport and OneIter.
Required Methods§
Sourceunsafe fn word_unchecked(parent: &BitVector, index: usize) -> u64
unsafe fn word_unchecked(parent: &BitVector, index: usize) -> u64
Unsafe version of Transformation::word without bounds checks.
§Safety
Behavior is undefined if index * 64 is not a valid offset in the bit array.
Sourcefn count_ones(parent: &BitVector) -> usize
fn count_ones(parent: &BitVector) -> usize
Returns the length of the integer array or the number of ones in the bit array of the transformed bitvector.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.