Re: [Boost-bugs] [Boost C++ Libraries] #2457: Compatible Sorting Criteria definition

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2457: Compatible Sorting Criteria definition
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-13 20:22:27


#2457: Compatible Sorting Criteria definition
---------------------------+------------------------------------------------
  Reporter: dave | Owner: joaquin
      Type: Bugs | Status: closed
 Milestone: Boost 1.37.0 | Component: multi_index
   Version: Boost 1.36.0 | Severity: Optimization
Resolution: invalid | Keywords:
---------------------------+------------------------------------------------

Comment (by joaquin):

>Explaining this to laymen is simple: when you're looking for a value in a
 sorted range, comparison with that value has one result for the first N
 elements and the opposite result for the rest of the elements. Thus, the
 comparison partitions the range into two parts, and we're looking for the
 boundary between those parts.

 Suppose we have a sequence of strings sorted lexicographically: we can use
 binary search algorithms to look up things comparing only the first letter
 (so that for instance equal_range'ing for 'A' would yield all elements
 beginning with 'A' etc.) My concern is: will the layman grasp intutively
 that first letter comparison is compatible (in this sense) with
 lexicographical comparison from the partitioning-based description of
 algorithms alone?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2457#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC