mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 12:20:00 +00:00
[docs] The STL "binary search" has a non-obvious name.
std::lower_bound is the canonical "binary search" in the STL (std::binary_search generally is not what you want). The name actually makes a lot of sense (and also has a beautiful symmetry with the std::upper_bound algorithm). The name is nonetheless non-obvious. Also, remove mention of "radix search". It's not even clear how that would work in the context of a sorted vector. AFAIK "radix search" only makes sense when you have a trie-like data structure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d21a64abf
commit
4991289b33
@ -1016,7 +1016,9 @@ coupled with a good choice of :ref:`sequential container <ds_sequential>`.
|
||||
This combination provides the several nice properties: the result data is
|
||||
contiguous in memory (good for cache locality), has few allocations, is easy to
|
||||
address (iterators in the final vector are just indices or pointers), and can be
|
||||
efficiently queried with a standard binary or radix search.
|
||||
efficiently queried with a standard binary search (e.g.
|
||||
``std::lower_bound``; if you want the whole range of elements comparing
|
||||
equal, use ``std::equal_range``).
|
||||
|
||||
.. _dss_smallset:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user