Keywords: ISO C++, library

Chapter 24. Algorithms
Prev | Part III. Extensions | Next

## Chapter 24. Algorithms

25.1.6 (count, count_if) is extended with two more versions of count and count_if. The standard versions return their results. The additional signatures return void, but take a final parameter by reference to which they assign their results, e.g.,

       void count (first, last, value, n);

25.2 (mutating algorithms) is extended with two families of signatures, random_sample and random_sample_n.

25.2.1 (copy) is extended with

       copy_n (_InputIter first, _Size count, _OutputIter result);

which copies the first 'count' elements at 'first' into 'result'.

25.3 (sorting 'n' heaps 'n' stuff) is extended with some helper predicates. Look in the doxygen-generated pages for notes on these.

- `is_heap` tests whether or not a range is a heap.

- `is_sorted` tests whether or not a range is sorted in nondescending order.

25.3.8 (lexicographical_compare) is extended with

       lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
    				 _InputIter2 first2, _InputIter2 last2)

which does... what?

Prev | Up | Next
Chapter 23. Utilities | Home | Chapter 25. Numerics