Heapify()
System::MemoryExtensions::Details::Heapify(Span<TKey>&, Span<TValue>&, int32_t, int32_t, std::function<int32_t(const TKey&, const TKey&)>) function
Maintains heap property for key-value pairs.
template<typename TKey,typename TValue> void System::MemoryExtensions::Details::Heapify(Span<TKey> &keys, Span<TValue> &values, int32_t n, int32_t i, 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 in the heap |
values | Span<TValue>& | The span of values in the heap |
n | int32_t | Size of the heap |
i | int32_t | Index to heapify from |
comparer | std::function<int32_t(const TKey&, const TKey&)> | Comparison function for keys |
See Also