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§
sourcefn search_sorted_by<F: FnMut(usize) -> Ordering, N: FnMut(usize) -> Ordering>(
&self,
find: F,
side_find: N,
side: SearchSortedSide,
) -> SearchResult
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§
fn search_sorted(&self, value: &T, side: SearchSortedSide) -> SearchResultwhere
Self: IndexOrd<T>,
Object Safety§
This trait is not object safe.