Skip to content

num::group_by

Defined in header <stats/selection.hpp>

template <typename Key>
auto group_by(idx count, Key &&key);

Group the indices in [0, count) by key(index).

Returns the distinct keys in order of first appearance, and for each index the position of its key among them.