Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Algo/BinarySearch.h |
Include |
#include "Algo/BinarySearch.h" |
namespace Algo
{
template<typename RangeType, typename ValueType, typename SortPredicateType>
auto Algo::LowerBound
(
RangeType & Range,
const ValueType & Value,
SortPredicateType SortPredicate
)
}
Performs binary search, resulting in position of the first element >= Value using predicate
Position of the first element >= Value, may be position after last element in range
Parameter |
Description |
---|---|
Range |
Range to search through, must be already sorted by SortPredicate |
Value |
Value to look for |
SortPredicate |
Predicate for sort comparison, defaults to < |