Expand description

Double sort works by separating the elements into pairs of two called nodes, this allows to order the two elements within the node extremely fast since it’s a 1:1 memory swap.

Grouping elements by nodes allows a simple loop statement to order the whole vector in n/2 - 1 reads maximum by utilizing BinaryHeaps

Usage

[dependencies]
double_sort = "1.2.0"

Functions

Works in the same way that double_sort does but utilizes BinaryHeaps. This provides a faster but less logarithmic sort since it only shaves half heap.pop() runs.

Sorts a vector of elements by pairing them and ordering them by the lowest number, then exchanging elements with neighbours until sorted.