Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Algo > API/Runtime/Core/Algo/Algo__BinarySearch
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 SortPredicateType>
auto Algo&58;&58;BinarySearch
&40;
RangeType & Range,
const ValueType & Value,
SortPredicateType SortPredicate
&41;
}
Remarks
Returns index to the first found element matching a value in a range, the range must be sorted by < Index of found element, or INDEX_NONE
Parameters
| Name | Description |
|---|---|
| Range | The range to search, must be already sorted by SortPredicate |
| Value | The value to search for |
| SortPredicate | Predicate for sort comparison, defaults to < |