Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stl ordering - strict weak ordering

Tags:

Why does STL work with a comparison function that is strict weak ordering? Why can't it be partial ordering?

like image 352
FL4SOF Avatar asked Aug 18 '09 11:08

FL4SOF


People also ask

What is a strict weak 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.

What is weak ordering in economics?

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.

What is meant by weak ordering?

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.


1 Answers

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?

like image 78
Greg Hewgill Avatar answered Sep 21 '22 01:09

Greg Hewgill