AlgoImpl::UpperBoundInternal

Performs binary search, resulting in position of the first element that is larger than the given value

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Algo/BinarySearch.h"

Syntax

namespace AlgoImpl
{
    template<typename RangeValueType, typename SizeType, typename PredicateValueType, typename ProjectionType, typename SortPredicateType>
    SizeType AlgoImpl::UpperBoundInternal
    (
        RangeValueType * First,
        const SizeType Num,
        const PredicateValueType & Value,
        ProjectionType Projection,
        SortPredicateType SortPredicate
    )
}

Remarks

Performs binary search, resulting in position of the first element that is larger than the given value

Returns

Position of the first element > Value, may be == Num

Parameters

Parameter

Description

First

Pointer to array

Num

Number of elements in array

Value

Value to look for

SortPredicate

Predicate for sort comparison

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