Why does STL work with a comparison function that is strict weak ordering? Why can't it be partial ordering?
A Strict Weak Ordering is a Binary Predicate that compares two objects, returning true if the first precedes the second. This predicate must satisfy the standard mathematical definition of a strict weak ordering.
Thus, a weak ordering consists of a division into groups, in which sequence of groups is strongly ordered, but in which there is no ordering within the groups. We have seen that consumer is indifferent on an indifference curve as all the points lying on it give same level of satisfaction.
In mathematics, especially order theory, a weak ordering is a mathematical formalization of the intuitive notion of a ranking of a set, some of whose members may be tied with each other.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With