parameters: (values, value, pred=lambda x, y: x < y)
return_statement: return -1
docstring: Implementation of C++ std::binary_search() algorithm.
docstring_summary: Implementation of C++ std::binary_search() algorithm.
docstring_tokens: Implementation of C ++ std :: binary_search () algorithm .
function: def _BinarySearch(values, value, pred=lambda x, y: x < y):
    """Implementation of C++ std::binary_search() algorithm."""
    index = _LowerBound(values, value, pred)
    if index != len(values) and not pred(value, values[index]):
      return index
    return -1
function_tokens: def _BinarySearch ( values , value , pred = lambda x , y : x < y ) : index = _LowerBound ( values , value , pred ) if index != len ( values ) and not pred ( value , values [ index ] ) : return index return - 1