Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TArrayView
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void StableSort () |
Stable sorts the array assuming < operator is defined for the item type. | Containers/ArrayView.h | |
void StableSort
(
const PREDICATE_CLASS& Predicate |
Stable sorts the array using user defined predicate class. | Containers/ArrayView.h |
StableSort()
Description
Stable sorts the array assuming < operator is defined for the item type.
- Stable sort is slower than non-stable algorithm.
-
If your array contains raw pointers, they will be automatically dereferenced during sorting. Therefore, your array will be sorted by the values being pointed to, rather than the pointers' values. If this is not desirable, please use Algo::StableSort(MyArray) directly instead. The auto-dereferencing behavior does not occur with smart pointers.
| Name | StableSort |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/ArrayView.h |
| Include Path | #include "Containers/ArrayView.h" |
void StableSort()
StableSort(const PREDICATE_CLASS &)
Description
Stable sorts the array using user defined predicate class.
- Stable sort is slower than non-stable algorithm.
-
If your array contains raw pointers, they will be automatically dereferenced during sorting. Therefore, your predicate will be passed references rather than pointers. If this is not desirable, please use Algo::StableSort(MyArray, Predicate) directly instead. The auto-dereferencing behavior does not occur with smart pointers.
| Name | StableSort |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/ArrayView.h |
| Include Path | #include "Containers/ArrayView.h" |
template<class PREDICATE_CLASS>
void StableSort
(
const PREDICATE_CLASS & Predicate
)
Parameters
| Name | Remarks |
|---|---|
| Predicate | Predicate class instance |