Standard C++ Library Class Reference
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
partial_sort
Algorithm
Summary
Templated algorithm for sorting collections of entities.
Contents
Synopsis●
Description●
Complexity●
Example●
Warning●
See Also●
Synopsis
#include <algorithm>
template <class RandomAccessIterator>
void partial_sort (RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last);
template <class RandomAccessIterator, class Compare>
void partial_sort (RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last, Compare comp);
Description
The partial_sort algorithm takes the range [first,last) and places the first middle - first values into
sorted order. The result is that the range [first, middle)is sorted like it would be if the entire range
[first,last) were sorted. The remaining elements in the range (those in [middle, last)) are not in any