Navigation
API > API/Runtime > API/Runtime/Core
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int Algo::CompareSet
(
const SetType& A, |
Algo/Compare.h | ||
int Algo::CompareSet
(
const SetType& A, |
Compares two sets (e.g. TSet) as if they were sorted arrays of keys (almost, see note on sort order). | Algo/Compare.h |
Algo::CompareSet(const SetType &, const SetType &)
| Name | Algo::CompareSet |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Algo/Compare.h |
| Include Path | #include "Algo/Compare.h" |
namespace Algo
{
template<typename SetType>
int Algo::CompareSet
(
const SetType & A,
const SetType & B
)
}
Algo::CompareSet(const SetType &, const SetType &, KeyLessThanType)
Description
Compares two sets (e.g. TSet) as if they were sorted arrays of keys (almost, see note on sort order).
Note on sort order: Maps with a smaller number of elements are considered less than maps with a larger number of elements, no matter what keys are present in each map. This drastically improves performance when comparing maps of different sizes. This is different than would be exepcted from a lexical compare of strings, but it does match the comparison of two numbers represented as a string of digits.
SetType interface: typename ElementType IntType Num(), bool Contains(const KeyType&), IteratorType
| Name | Algo::CompareSet |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Algo/Compare.h |
| Include Path | #include "Algo/Compare.h" |
namespace Algo
{
template<typename SetType, typename KeyLessThanType>
int Algo::CompareSet
(
const SetType & A,
const SetType & B,
KeyLessThanType KeyLessThan
)
}
-1 if A < B, 0 if A == B, 1 if A > B
Parameters
| Name | Remarks |
|---|---|
| A | Left-Hand-Side set container. |
| B | Right-Hand-Side set container. |
| KeyLessThan | bool(const KeyType& A, const KeyType& B) that returns A < B. |