Algo::TransformAccumulate

Sums a range by applying MapOp to each element, and then summing the results.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Algo/Accumulate.h"

Syntax

namespace Algo
{
    template<typename T, typename A, typename MapT>
    T Algo::TransformAccumulate
    (
        const A & Input,
        MapT MapOp,
        T Init
    )
}

Remarks

Sums a range by applying MapOp to each element, and then summing the results.

Returns

the result of mapping and then summing all the elements of Input

Parameters

Parameter

Description

Input

Any iterable type

Init

Initial value for the summation

MapOp

Mapping Operation

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