multi_merge
- corsort.multi_merge(xs, split_pointer_list, lt=None)[source]
Merge consecutive sorted portions of a list, two by two, in alternance.
Assume that xs[i:j] and xs[j:k] are already sorted, and merge-sort them.
- Parameters:
Examples
>>> my_xs = [2, 5, 0, 1, 7, 8, 3, 4, 6] >>> my_split_pointer_list = np.array([0, 2, 4, 6, 9]) >>> multi_merge(my_xs, my_split_pointer_list) >>> my_xs [0, 1, 2, 5, 3, 4, 6, 7, 8]