Module |
|
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>
auto Algo::UpperBoundBy
(
RangeType & Range,
const ValueType & Value,
ProjectionType Projection,
SortPredicateType SortPredicate
)
}
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
Parameter |
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 < |