Merge

Stable merge to perform sort below. Stable sort is slower than non-stable algorithm.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/Sorting.h

Include

#include "Templates/Sorting.h"

Syntax

template<class T, class PREDICATE_CLASS>
void Merge
(
    T * Out,
    T * In,
    const int32 Mid,
    const int32 Num,
    const PREDICATE_CLASS & Predicate
)

Remarks

Stable merge to perform sort below. Stable sort is slower than non-stable algorithm.

Parameters

Parameter

Description

Out

Pointer to the first element of output array.

In

Pointer to the first element to sort.

Mid

Middle point of the table, i.e. merge separator.

Num

Number of elements in the whole table.

Predicate

Predicate class.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss