polars_utils::binary_search

Trait ExponentialSearch

Source
pub trait ExponentialSearch<T> {
    // Required method
    fn exponential_search_by<F>(&self, f: F) -> Result<usize, usize>
       where F: FnMut(&T) -> Ordering;

    // Provided method
    fn partition_point_exponential<P>(&self, pred: P) -> usize
       where P: FnMut(&T) -> bool { ... }
}

Required Methods§

Source

fn exponential_search_by<F>(&self, f: F) -> Result<usize, usize>
where F: FnMut(&T) -> Ordering,

Provided Methods§

Source

fn partition_point_exponential<P>(&self, pred: P) -> usize
where P: FnMut(&T) -> bool,

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.

Implementations on Foreign Types§

Source§

impl<T: Debug> ExponentialSearch<T> for &[T]

Source§

fn exponential_search_by<F>(&self, f: F) -> Result<usize, usize>
where F: FnMut(&T) -> Ordering,

Implementors§