BufferUtil::FilterInPlace

Removes elements of array (or within requested range) that do not pass Predicate, by shifting forward.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Util/BufferUtil.h

Include

#include "Util/BufferUtil.h"

Syntax

namespace BufferUtil
{
    template<typename T>
    int BufferUtil::FilterInPlace
    (
        TArray< T > & Data,
        const TFunction< bool> & Predicate,
        int MaxIndex,
        int StartIndex
    )
}

Remarks

Removes elements of array (or within requested range) that do not pass Predicate, by shifting forward. Does not remove remaining elements

Returns

Number of valid elements in Data after filtering

Parameters

Parameter

Description

Data

Array to process

Predicate

filtering function, return true indicates valid

MaxIndex

optional maximum index in array (exclusive, default is to use array size)

StartIndex

optional start index in array (default 0)

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