Crate double_sort
source · [−]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.0.0"Functions
Sorts a vector of elements by pairing them and ordering them by the lowest number, then exchanging elements with neighbours until sorted.