Algo::Partition

Rearranges the elements so that all the elements for which Predicate returns true precede all those for which it returns false.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Algo/Partition.h

Include

#include "Algo/Partition.h"

Syntax

namespace Algo
{
    template<class T, typename IndexType, class UnaryPredicate>
    IndexType Algo::Partition
    (
        T * Elements,
        const IndexType Num,
        const UnaryPredicate & Predicate
    )
}

Remarks

Rearranges the elements so that all the elements for which Predicate returns true precede all those for which it returns false. (not stable)

Returns

index of the first element in the second group

Parameters

Parameter

Description

First

pointer to the first element

Num

the number of items

Predicate

unary 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