method

bsearch_index

Importance_1
v2_4_6 - Show latest stable - 0 notes - Class: Array
bsearch_index() public

By using binary search, finds an index of a value from this array which meets the given condition in O(log n) where n is the size of the array.

It supports two modes, depending on the nature of the block and they are exactly the same as in the case of #bsearch method with the only difference being that this method returns the index of the element instead of the element itself. For more details consult the documentation for #bsearch.

Show source
Register or log in to add new notes.