本文介绍了难道C ++算法/升压库有基数排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! pretty的自我解释,看问题标题。我想排序整数,我​​知道基数排序应该是真棒它。任何库实现这种?Pretty self explanatory, look at the Question Title. I am trying to sort integers and I know radix sort is supposed to be awesome for it. Any library implementation for this sort?推荐答案取决于你如何严格界定的基数排序的,因为升压1.58.0包含的小号preadsort 的,这是一个混合排序算法,启发性地混合桶和比较排序。Depends on how strictly you define radix sort, since Boost 1.58.0 includes Spreadsort, which is a hybrid sorting algorithm that heuristically mixes bucket and comparison sorting.有关分类整数和与最坏情况Θ(n)的效率没有要求,S preadsort应该满足你。For sorting integers and with no requirement for worst-case Θ(n) efficiency, Spreadsort should satisfy you.为了便于讨论,还可以看看我的实现 LSD基数排序,这与内存效率非常低,但偶尔也会更快超过新preadsort。你只需要radix_sort分支,但我已经联系到speed_test分支,因为它的自述。For argument's sake, you can also take a look at my implementation of LSD radix sort, which is fairly inefficient with memory but occasionally faster than Spreadsort. You only require the radix_sort branch but I've linked to the speed_test branch because it has the readme. 这篇关于难道C ++算法/升压库有基数排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 04:38
查看更多