[][src]Trait vrp_core::utils::CollectGroupBy

pub trait CollectGroupBy: Iterator {
    fn collect_group_by_key<K, V, FA>(self, f: FA) -> HashMap<K, Vec<V>>
    where
        Self: Sized + Iterator<Item = V>,
        K: Hash + Eq,
        FA: Fn(&V) -> K
, { ... }
fn collect_group_by<K, V>(self) -> HashMap<K, Vec<V>>
    where
        Self: Sized + Iterator<Item = (K, V)>,
        K: Hash + Eq
, { ... } }

An iterator which collects items into group.

Provided methods

fn collect_group_by_key<K, V, FA>(self, f: FA) -> HashMap<K, Vec<V>> where
    Self: Sized + Iterator<Item = V>,
    K: Hash + Eq,
    FA: Fn(&V) -> K, 

Collects items into group.

fn collect_group_by<K, V>(self) -> HashMap<K, Vec<V>> where
    Self: Sized + Iterator<Item = (K, V)>,
    K: Hash + Eq

Collects items into group.

Loading content...

Implementors

impl<T: Iterator> CollectGroupBy for T[src]

Loading content...