Classes | |
class | MergeInPlace |
class | MergeWithBuffer |
Functions | |
template<typename IT , typename Compare = std::less<typename std::iterator_traits<IT>::value_type>> | |
void | Bubble (const IT &begin, const IT &end) |
template<typename IT , typename Compare = std::less<typename std::iterator_traits<IT>::value_type>> | |
void | Cocktail (const IT &begin, const IT &end) |
template<typename IT , typename Compare = std::less<typename std::iterator_traits<IT>::value_type>> | |
void | Comb (const IT &begin, const IT &end) |
template<typename IT , typename Aggregator = MergeWithBuffer<IT>> | |
void | MergeSort (const IT &begin, const IT &end) |
template<typename IT , typename Compare = std::less_equal<typename std::iterator_traits<IT>::value_type>> | |
IT | Partition (const IT &begin, const IT &pivot, const IT &end) |
template<typename IT , typename Compare = std::less_equal<typename std::iterator_traits<IT>::value_type>> | |
void | QuickSort (const IT &begin, const IT &end) |
template<typename IT > | |
void | RaddixSort (const IT &begin, const IT &end, unsigned int base=10) |
Function Documentation
void huc::sort::Bubble | ( | const IT & | begin, |
const IT & | end | ||
) |
Bubble Sort - Proceed an in-place sort on the elements.
- Template Parameters
-
IT type using to go through the collection. Compare functor type (std::less_equal in order, std::greater_equal for inverse order).
- Parameters
-
begin,end iterators to the initial and final positions of the sequence to be sorted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
- Returns
- void.
Definition at line 41 of file bubble.hxx.
void huc::sort::Cocktail | ( | const IT & | begin, |
const IT & | end | ||
) |
Cocktail Sort - Proceed an in-place sort on the elements.
- Template Parameters
-
IT type using to go through the collection. Compare functor type (std::less_equal in order, std::greater_equal for inverse order).
- Parameters
-
begin,end iterators to the initial and final positions of the sequence to be sorted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
- Returns
- void.
Definition at line 41 of file cocktail.hxx.
void huc::sort::Comb | ( | const IT & | begin, |
const IT & | end | ||
) |
Comb Sort - Proceed an in-place sort on the elements.
- Template Parameters
-
IT type using to go through the collection. Compare functor type (std::less_equal in order, std::greater_equal for inverse order).
- Parameters
-
begin,end iterators to the initial and final positions of the sequence to be sorted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
- Returns
- void.
Definition at line 41 of file comb.hxx.
void huc::sort::MergeSort | ( | const IT & | begin, |
const IT & | end | ||
) |
MergeSort - Proceed sort on the elements whether using an in-place strategy or using a buffer one.
- Template Parameters
-
IT type using to go through the collection. Aggregator functor type used to aggregate two sorted sequences.
- Parameters
-
begin,end iterators to the initial and final positions of the sequence to be sorted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
- Returns
- void.
Definition at line 141 of file merge.hxx.
IT huc::sort::Partition | ( | const IT & | begin, |
const IT & | pivot, | ||
const IT & | end | ||
) |
Partition-Exchange - Proceed an in-place patitionning on the elements.
- Template Parameters
-
IT type using to go through the collection. Compare functor type (std::less_equal for smaller elements in left partition, std::greater_equal for greater elements in left partition).
- Parameters
-
begin,end const iterators to the initial and final positions of the sequence to be pivoted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last. pivot iterator on which the partition is delimited between begin and end.
- Returns
- new pivot iterator.
Definition at line 43 of file partition.hxx.
void huc::sort::QuickSort | ( | const IT & | begin, |
const IT & | end | ||
) |
Quick Sort - Proceed an in-place sort on the elements.
- Template Parameters
-
IT type using to go through the collection. Compare functor type (std::less_equal in order, std::greater_equal for inverse order).
- Parameters
-
begin,end iterators to the initial and final positions of the sequence to be sorted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
- Returns
- void.
Definition at line 40 of file quick.hxx.
void huc::sort::RaddixSort | ( | const IT & | begin, |
const IT & | end, | ||
unsigned int | base = 10 |
||
) |
LSD Raddix Sort - Non-comparative integer sorting algorithm Proceed a raddix-sort on the elements contained in [begin, end[
- Warning
- Works properly only with integral type of non-negative values.
- Template Parameters
-
IT type using to go through the collection.
- Parameters
-
begin,end iterators to the initial and final positions of the sequence to be sorted. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last. base base in which the numbers are represented.
- Returns
- void.
Definition at line 45 of file raddix.hxx.