11inline void InsertionSort(Iterator inBegin, Iterator inEnd, Compare inCompare)
17 for (Iterator i = inBegin + 1; i != inEnd; ++i)
20 auto x = std::move(*i);
23 if (inCompare(x, *inBegin))
27 for (Iterator j = i; j != inBegin; j = prev)
34 *inBegin = std::move(x);
40 for (Iterator prev = j - 1; inCompare(x, *prev); j = prev, --prev)
41 *j = std::move(*prev);
JPH_NAMESPACE_BEGIN void InsertionSort(Iterator inBegin, Iterator inEnd, Compare inCompare)
Implementation of the insertion sort algorithm.
Definition InsertionSort.h:11