![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Variables | |
| constexpr size_t | MinMergeSubgroupSize = 2 |
| ULANG_FORCEINLINE int32_t uLang::AlgoImpl::HeapGetLeftChildIndex | ( | int32_t | Index | ) |
Gets the index of the left child of node at Index.
| Index | Node for which the left child index is to be returned. |
| ULANG_FORCEINLINE int32_t uLang::AlgoImpl::HeapGetParentIndex | ( | int32_t | Index | ) |
Gets the parent index for node at Index.
| Index | node index. |
| ULANG_FORCEINLINE void uLang::AlgoImpl::HeapifyInternal | ( | RangeValueType * | First, |
| int32_t | Num, | ||
| ProjectionType | Projection, | ||
| PredicateType | Predicate | ||
| ) |
Builds an implicit min-heap from a range of elements. This is the internal function used by Heapify overrides.
| First | pointer to the first element to heapify |
| Num | the number of items to heapify |
| Projection | The projection to apply to the elements. |
| Predicate | A binary predicate object used to specify if one element should precede another. |
| ULANG_FORCEINLINE bool uLang::AlgoImpl::HeapIsLeaf | ( | int32_t | Index, |
| int32_t | Count | ||
| ) |
Checks if node located at Index is a leaf or not.
| Index | Node index. |
| ULANG_FORCEINLINE void uLang::AlgoImpl::HeapSiftDown | ( | RangeValueType * | Heap, |
| int32_t | Index, | ||
| const int32_t | Count, | ||
| const ProjectionType & | Projection, | ||
| const PredicateType & | Predicate | ||
| ) |
Fixes a possible violation of order property between node at Index and a child.
| Heap | Pointer to the first element of a binary heap. |
| Index | Node index. |
| Count | Size of the heap. |
| Projection | The projection to apply to the elements. |
| Predicate | A binary predicate object used to specify if one element should precede another. |
| ULANG_FORCEINLINE int32_t uLang::AlgoImpl::HeapSiftUp | ( | RangeValueType * | Heap, |
| int32_t | RootIndex, | ||
| int32_t | NodeIndex, | ||
| const ProjectionType & | Projection, | ||
| const PredicateType & | Predicate | ||
| ) |
Fixes a possible violation of order property between node at NodeIndex and a parent.
| Heap | Pointer to the first element of a binary heap. |
| RootIndex | How far to go up? |
| NodeIndex | Node index. |
| Projection | The projection to apply to the elements. |
| Predicate | A binary predicate object used to specify if one element should precede another. |
| void uLang::AlgoImpl::HeapSortInternal | ( | RangeValueType * | First, |
| int32_t | Num, | ||
| ProjectionType | Projection, | ||
| PredicateType | Predicate | ||
| ) |
Performs heap sort on the elements. This is the internal sorting function used by HeapSort overrides.
| First | pointer to the first element to sort |
| Num | the number of elements to sort |
| Predicate | predicate class |
| void uLang::AlgoImpl::IntroSortInternal | ( | T * | First, |
| size_t | Num, | ||
| ProjectionType | Projection, | ||
| PredicateType | Predicate | ||
| ) |
Implementation of an introspective sort. Starts with quick sort and switches to heap sort when the iteration depth is too big. The sort is unstable, meaning that the ordering of equal items is not necessarily preserved. This is the internal sorting function used by IntroSort overrides.
| First | pointer to the first element to sort |
| Num | the number of items to sort |
| Projection | The projection to sort by when applied to the element. |
| Predicate | predicate class |
| ULANG_FORCEINLINE SizeType uLang::AlgoImpl::LowerBoundInternal | ( | RangeValueType * | First, |
| const SizeType | Num, | ||
| const PredicateValueType & | Value, | ||
| ProjectionType | Projection, | ||
| SortPredicateType | SortPredicate | ||
| ) |
Performs binary search, resulting in position of the first element >= Value
| First | Pointer to array |
| Num | Number of elements in array |
| Value | Value to look for |
| Projection | Called on values in array to get type that can be compared to Value |
| SortPredicate | Predicate for sort comparison |
| void uLang::AlgoImpl::Merge | ( | T * | First, |
| size_t | Mid, | ||
| size_t | Num, | ||
| ProjectionType | Projection, | ||
| PredicateType | Predicate | ||
| ) |
| size_t uLang::AlgoImpl::RotateInternal | ( | T * | First, |
| size_t | Num, | ||
| size_t | Count | ||
| ) |
| void uLang::AlgoImpl::StableSortInternal | ( | T * | First, |
| size_t | Num, | ||
| ProjectionType | Projection, | ||
| PredicateType | Predicate | ||
| ) |
Sort elements using user defined projection and predicate classes. The sort is stable, meaning that the ordering of equal items is preserved. This is the internal sorting function used by the Algo::Sort overloads.
| First | Pointer to the first element to sort. |
| Num | The number of items to sort. |
| Projection | A projection to apply to each element to get the value to sort by. |
| Predicate | A predicate class which compares two projected elements and returns whether one occurs before the other. |
| ULANG_FORCEINLINE SizeType uLang::AlgoImpl::UpperBoundInternal | ( | RangeValueType * | First, |
| const SizeType | Num, | ||
| const PredicateValueType & | Value, | ||
| ProjectionType | Projection, | ||
| SortPredicateType | SortPredicate | ||
| ) |
Performs binary search, resulting in position of the first element that is larger than the given value
| First | Pointer to array |
| Num | Number of elements in array |
| Value | Value to look for |
| SortPredicate | Predicate for sort comparison |