docs/Writerside/topics/array_list.h.md

changeset 1507
f4010cda9a2a
parent 1429
6e0c3a8a914a
equal deleted inserted replaced
1506:2a4339475bcf 1507:f4010cda9a2a
309 except that they return the index of the closest element if the searched element is not found. 309 except that they return the index of the closest element if the searched element is not found.
310 The former function returns the closest element that is less or equal (the greatest lower bound / infimum), 310 The former function returns the closest element that is less or equal (the greatest lower bound / infimum),
311 and the latter function returns the closest element that is larger or equal (the least upper bound / supremum) 311 and the latter function returns the closest element that is larger or equal (the least upper bound / supremum)
312 than the searched element. 312 than the searched element.
313 313
314 When the found element appears more than once in the array,
315 the binary search and the infimum report the largest index
316 and the supremum reports the smallest index of the identical items, respectively.
317
314 > Note that all the above functions are only well-defined on arrays which are sorted with respect to the given compare function. 318 > Note that all the above functions are only well-defined on arrays which are sorted with respect to the given compare function.
315 > 319 >
316 > This can, for example, easily be achieved by calling the standard library's `qsort()` function. 320 > This can, for example, easily be achieved by calling the standard library's `qsort()` function.
317 >{style="note"} 321 >{style="note"}
318 322

mercurial