为什么 STL 使用 严格弱排序的比较函数?为什么不能偏序?
Why does STL work with a comparison function that is strict weak ordering? Why can't it be partial ordering?
A 部分顺序不足以实现某些算法,例如排序算法.由于偏序集合不一定定义集合中所有元素之间的关系,那么如何对偏序内没有顺序关系的两个项目的列表进行排序?
A partial order would not be sufficient to implement some algorithms, such as a sorting algorithm. Since a partially ordered set does not necessarily define a relationship between all elements of the set, how would you sort a list of two items that do not have an order relationship within the partial order?
这篇关于stl 排序 - 严格弱排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!