Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Algo > API/Runtime/Core/Algo/Algo__UpperBoundBy
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Algo/BinarySearch.h |
| Include | #include "Algo/BinarySearch.h" |
namespace Algo
{
template<typename RangeType, typename ValueType, typename ProjectionType, typename SortPredicateType>
decltype) Algo::UpperBoundBy
(
RangeType & Range,
const ValueType & Value,
ProjectionType Projection,
SortPredicateType SortPredicate
)
}
Remarks
Performs binary search, resulting in position of the first element with projected value > Value using predicate Position of the first element > Value, may be past end of range
Parameters
| Name | Description |
|---|---|
| Range | Range to search through, must be already sorted by SortPredicate |
| Value | Value to look for |
| Projection | Functor or data member pointer, called via Invoke to compare to Value |
| SortPredicate | Predicate for sort comparison, defaults to < |