Functions
Sorting Algorithms

Functions

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
OutputIterator ustl::merge (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
 Combines two sorted ranges.
 
template<typename InputIterator >
void ustl::inplace_merge (InputIterator first, InputIterator middle, InputIterator last)
 
template<typename RandomAccessIterator >
void ustl::sort (RandomAccessIterator first, RandomAccessIterator last)
 
template<typename RandomAccessIterator >
void ustl::stable_sort (RandomAccessIterator first, RandomAccessIterator last)
 
template<typename RandomAccessIterator >
void ustl::partial_sort (RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last)
 Makes [first,middle) a part of the sorted array. Contents of [middle,last) is undefined. This implementation just calls stable_sort.
 
template<typename InputIterator , typename RandomAccessIterator >
RandomAccessIterator ustl::partial_sort_copy (InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last)
 Like partial_sort, but outputs to [result_first,result_last)
 
template<typename Container >
void ustl::sort (Container &ctr)
 
template<typename Container , typename Compare >
void ustl::sort (Container &ctr, Compare comp)
 
template<typename Container >
void ustl::stable_sort (Container &ctr)
 
template<typename Container , typename Compare >
void ustl::stable_sort (Container &ctr, Compare comp)
 
template<typename RandomAccessIterator , typename Compare >
void ustl::make_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 make_heap turns the range [first, last) into a heap At completion, is_heap (first, last, comp) is true. The algorithm is adapted from "Classic Data Structures in C++" by Timothy Budd.
 
template<typename RandomAccessIterator , typename Compare >
void ustl::sort_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 

Detailed Description

Algorithms for sorting containers.

Function Documentation

template<typename InputIterator >
void ustl::inplace_merge ( InputIterator  first,
InputIterator  middle,
InputIterator  last 
)

Combines two sorted ranges from the same container.

References ustl::reverse().

template<typename Container >
void ustl::sort ( Container &  ctr)
inline

Sorts the container

References ustl::sort().

template<typename Container , typename Compare >
void ustl::sort ( Container &  ctr,
Compare  comp 
)
inline

Sorts the container

References ustl::sort().

template<typename RandomAccessIterator >
void ustl::sort ( RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Sorts the container

References ustl::sort().

template<typename RandomAccessIterator , typename Compare >
void ustl::sort_heap ( RandomAccessIterator  first,
RandomAccessIterator  last,
Compare  comp 
)

Sorts heap [first, last) in descending order according to comp.

References ustl::pop_heap().

template<typename Container >
void ustl::stable_sort ( Container &  ctr)
inline

Sorts the container

References ustl::stable_sort().

template<typename Container , typename Compare >
void ustl::stable_sort ( Container &  ctr,
Compare  comp 
)
inline

Sorts the container

References ustl::stable_sort().

template<typename RandomAccessIterator >
void ustl::stable_sort ( RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Sorts the container

References ustl::stable_sort().


Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10