Trait vortex_array::compute::SearchSorted

source ·
pub trait SearchSorted<T> {
    // Required method
    fn search_sorted_by<F: FnMut(usize) -> Ordering, N: FnMut(usize) -> Ordering>(
        &self,
        find: F,
        side_find: N,
        side: SearchSortedSide,
    ) -> SearchResult;

    // Provided method
    fn search_sorted(&self, value: &T, side: SearchSortedSide) -> SearchResult
       where Self: IndexOrd<T> { ... }
}

Required Methods§

source

fn search_sorted_by<F: FnMut(usize) -> Ordering, N: FnMut(usize) -> Ordering>( &self, find: F, side_find: N, side: SearchSortedSide, ) -> SearchResult

find function is used to find the element if it exists, if element exists side_find will be used to find desired index amongst equal values

Provided Methods§

source

fn search_sorted(&self, value: &T, side: SearchSortedSide) -> SearchResult
where Self: IndexOrd<T>,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<S, T> SearchSorted<T> for S
where S: IndexOrd<T> + Len + ?Sized,