TArray.BinarySearch<T> Method
Overloads
| BinarySearch<T>(array of T, T, Integer) |
Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the default comparer. |
| BinarySearch<T>(array of T, T, Integer, Integer, Integer) |
Searches a range of elements in a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the default comparer. |
| BinarySearch<T>(array of T, T, Integer, IComparer<T>) |
Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparer. |
| BinarySearch<T>(array of T, T, Integer, IComparer<T>, Integer, Integer) |
Searches a range of elements in a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparer. |
| BinarySearch<T>(array of T, T, Integer, TComparison<T>) |
Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparison. |
| BinarySearch<T>(array of T, T, Integer, TComparison<T>, Integer, Integer) |
Searches a range of elements in a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparison. |
Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the default comparer.
class function BinarySearch<T>(const values: array of T; const item: T; out foundIndex: Integer): Boolean
Type Parameters
- T
Parameters
- values
- array of T
- item
- T
- foundIndex
- Integer
Returns
Searches a range of elements in a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the default comparer.
class function BinarySearch<T>(const values: array of T; const item: T; out foundIndex: Integer; index: Integer; count: Integer): Boolean
Type Parameters
- T
Parameters
- values
- array of T
- item
- T
- foundIndex
- Integer
- index
- Integer
- count
- Integer
Returns
Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparer.
class function BinarySearch<T>(const values: array of T; const item: T; out foundIndex: Integer; const comparer: IComparer<T>): Boolean
Type Parameters
- T
Parameters
- values
- array of T
- item
- T
- foundIndex
- Integer
- comparer
- IComparer<T>
Returns
Searches a range of elements in a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparer.
class function BinarySearch<T>(const values: array of T; const item: T; out foundIndex: Integer; const comparer: IComparer<T>; index: Integer; count: Integer): Boolean
Type Parameters
- T
Parameters
- values
- array of T
- item
- T
- foundIndex
- Integer
- comparer
- IComparer<T>
- index
- Integer
- count
- Integer
Returns
Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparison.
class function BinarySearch<T>(const values: array of T; const item: T; out foundIndex: Integer; const comparison: TComparison<T>): Boolean
Type Parameters
- T
Parameters
- values
- array of T
- item
- T
- foundIndex
- Integer
- comparison
- TComparison<T>
Returns
Searches a range of elements in a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparison.
class function BinarySearch<T>(const values: array of T; const item: T; out foundIndex: Integer; const comparison: TComparison<T>; index: Integer; count: Integer): Boolean
Type Parameters
- T
Parameters
- values
- array of T
- item
- T
- foundIndex
- Integer
- comparison
- TComparison<T>
- index
- Integer
- count
- Integer