selection_sort

This commit is contained in:
John Wellbelove 2021-03-17 14:25:01 +00:00
parent bb9f27bd8d
commit c75e7afe68

View File

@ -3350,22 +3350,6 @@ namespace etl
etl::sort_heap(first, last, compare);
}
//***************************************************************************
/// Sorts the elements using heap sort.
/// Uses user defined comparison.
///\ingroup algorithm
//***************************************************************************
template <typename TIterator, typename TCompare >
void heap_sort(TIterator first, TIterator last, TCompare compare)
{
if (!etl::is_heap(first, last, compare))
{
etl::make_heap(first, last, compare);
}
etl::sort_heap(first, last, compare);
}
//***************************************************************************
/// Sorts the elements using heap sort.
///\ingroup algorithm