The type of items in the array.
The type of the item.
An array in sorted order (compatible with the order induced by comparator
).
An item to search for.
This does not necessarily have to be an instance of T
, but it must be supported by the comparator function.
A comparison function.
The index of the item in input
, if the item was found.
Otherwise, a negative index is returned indicating where the item can be inserted to
maintain the current order: returnValue == -insertion point - 1
.
The actual (positive) insertion index can be obtained by calculating -(returnValue + 1)
.
Generated using TypeDoc
Performs binary search on a sorted array.