Open LucaCappelletti94 opened 3 months ago
hello It is not possible to do that with the primitive types (not with the lib in its current version) however it is possible to do that by implementing the trait for a struct documentation here: https://docs.rs/voracious_radix_sort/latest/voracious_radix_sort/ there is a deep difference between a radix sort and a comparative sort, the radix sort does not use a comparative function, thus, it cannot take a lambda (a comparative function) to sort the elements.
I have prepared a very generic wrapper that works well, I will make a PR so that it is available to other users. Performance-wise, measured with criterion, there seems to be no difference between using the struct and this other generic approach.
Hi! In my use case, I need to sort a vector containing both positive and negative values as if they are absolute.
I can do this with the
sort_unstable_by
quite simply using:Is there a way to do this with your library?