Force ascending groups. In other words [0, 0, 2, 1, 1, 1] is transformed to [0, 0, 1, 2, 2, 2].
The current grouping matrix
The grouping matrix with ascending groups