IntroSort()
System::MemoryExtensions::Details::IntroSort(Span<TKey>&, Span<TValue>&, int32_t, std::function<int32_t(const TKey&, const TKey&)>) function
Internal implementation of introsort algorithm for key-value pairs.
template<typename TKey,typename TValue> void System::MemoryExtensions::Details::IntroSort(Span<TKey> &keys, Span<TValue> &values, int32_t depthLimit, std::function<int32_t(const TKey &, const TKey &)> comparer)
Template parameters
Parameter | Description |
---|
TKey | The type of keys |
TValue | The type of values |
Arguments
Parameter | Type | Description |
---|
keys | Span<TKey>& | The span of keys to sort |
values | Span<TValue>& | The span of values to sort |
depthLimit | int32_t | Maximum recursion depth before switching to heapsort |
comparer | std::function<int32_t(const TKey&, const TKey&)> | Comparison function for keys |
See Also