pub fn from_ord_keys<Ls>(labels: Ls) -> Self
    where
        L: Ord,
        Ls: IntoIterator<Item=L>,
    {
        let mut map = std::collections::BTreeMap::new();
        for (i, key) in labels.into_iter().enumerate() {
            map.entry(key)
                .or_insert_with(Vec::new)
                .push(i);
        }
        Self::new(map.into_iter().collect()).expect("bug!")
    }
/// Construct a Part from a sequence of keys, with one
/// partition for each distinct value in the sequence.
///
/// The partitions in the output will be sorted by key.
Construct a Part from a sequence of keys, with one
partition for each distinct value in the sequence.

The partitions in the output will be sorted by key.
Construct a Part from a sequence of keys with one partition for each distinct value in the sequence . The partitions in the output will be sorted by key .
pub fn from_ord_keys<Ls>(labels: Ls) -> Self
    where
        L: Ord,
        Ls: IntoIterator<Item=L>,
    {
        let mut map = std::collections::BTreeMap::new();
        for (i, key) in labels.into_iter().enumerate() {
            map.entry(key)
                .or_insert_with(Vec::new)
                .push(i);
        }
        Self::new(map.into_iter().collect()).expect("bug!")
    }
pub fn from_ord_keys < Ls > ( labels : Ls ) -> Self where L : Ord , Ls : IntoIterator < Item = L > , { let mut map = std :: collections :: BTreeMap :: new ( ) ; for ( i , key ) in labels . into_iter ( ) . enumerate ( ) { map . entry ( key ) . or_insert_with ( Vec :: new ) . push ( i ) ; } Self :: new ( map . into_iter ( ) . collect ( ) ) . expect ( " " ) }
Construct a Part from a sequence of keys, with one
partition for each distinct value in the sequence.
Construct a Part from a sequence of keys with one partition for each distinct value in the sequence .
labels
Ls
labels
Ls