lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>>> "Egor" == Egor Skriptunoff <egor.skriptunoff@gmail.com> writes:

 >> The specific requirement that is violated is that the < relation
 >> used for the sort must be a strict partial order with this
 >> additional requirement: the relation (not (a < b or b < a)) must be
 >> an equivalence relation.

 Egor> Interesting.
 Egor> But this condition is too complex to be included in the manual.
 Egor> It would be more natural to simply replace "strict partial order"
 Egor> with "strict total order" :-)

"strict weak order" is the correct minimum requirement - a total order
is not necessary. (A strict weak order can be considered as a total
order over classes of equivalent elements; if you're sorting data where
distinguishable values can sort equally, e.g. objects sorted by some
property value, this distinction matters.)

The documentation is incorrect to state that a strict partial order is
sufficient. (I believe I may have pointed this out before.)

-- 
Andrew.