vortex_array::variants

Trait BoolArrayTrait

Source
pub trait BoolArrayTrait: ArrayTrait {
    // Required methods
    fn invert(&self) -> VortexResult<Array>;
    fn maybe_null_indices_iter<'a>(
        &'a self,
    ) -> Box<dyn Iterator<Item = usize> + 'a>;
    fn maybe_null_slices_iter<'a>(
        &'a self,
    ) -> Box<dyn Iterator<Item = (usize, usize)> + 'a>;

    // Provided method
    fn true_count(&self) -> usize { ... }
}

Required Methods§

Source

fn invert(&self) -> VortexResult<Array>

Return a new inverted version of this array.

True -> False False -> True Null -> Null

Source

fn maybe_null_indices_iter<'a>(&'a self) -> Box<dyn Iterator<Item = usize> + 'a>

An iterator over the sorted indices of set values in the underlying boolean array good to array with low number of set values.

§Warning

The set-ness of invalid positions is undefined and not necessarily consistent within a given iterator.

Source

fn maybe_null_slices_iter<'a>( &'a self, ) -> Box<dyn Iterator<Item = (usize, usize)> + 'a>

An iterator over the sorted disjoint contiguous range of set values in the underlying boolean array good for arrays with only long runs of set values.

§Warning

The set-ness of invalid positions is undefined and not necessarily consistent within a given iterator.

Provided Methods§

Source

fn true_count(&self) -> usize

Implementors§