pub fn redistribute_by_bins<T: Equivalence + Ord, C: CommunicatorCollectives>(
sorted_keys: &[T],
bins: &[T],
comm: &C,
) -> Vec<T>Expand description
Redistribute locally sorted keys with respect to bins.
- The array
sorted_keysis assumed to be sorted within each process. It needs not be globally sorted. - If there are
rranks in the communicator, the size ofbinsmust ber. - The bins are defined through half-open intervals
(bin[0], bin[1]), …. This defines r-1 bins. The last bin is the half-open interval[bin[r-1], \infty). - All array elements must be larger or equal
bin[0]. This means that each element can be sorted into a bin.