Trait flechasdb::nbest::TakeNBestByKey
source · pub trait TakeNBestByKey<T>where
Self: Sized,{
// Required method
fn n_best_by_key<K, F>(self, n: usize, f: F) -> NBestByKey<T, K, F>
where F: FnMut(&T) -> K,
K: PartialOrd;
}Expand description
Trait to select n-best elements in a collection.
Intended to be implemented for Iterator.
Required Methods§
sourcefn n_best_by_key<K, F>(self, n: usize, f: F) -> NBestByKey<T, K, F>where
F: FnMut(&T) -> K,
K: PartialOrd,
fn n_best_by_key<K, F>(self, n: usize, f: F) -> NBestByKey<T, K, F>where F: FnMut(&T) -> K, K: PartialOrd,
Selects n-best elements in the iterator.