1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
hi(binary_search)
itemization(
it() Header file: tt(<algorithm>)
it() Function prototypes:
itemization(
itt(bool binary_search(ForwardIterator first, ForwardIterator
last, Type const &value);)
itt(bool binary_search(ForwardIterator first, ForwardIterator
last, Type const &value, Comparator comp);)
)
it() Description:
itemization(
it() The first prototype: tt(value) is looked up using binary
search in the series of elements implied by the iterator range rangett(first,
last). The elements in the range must have been sorted by the
tt(Type::operator<) function. tt(True) is returned if the element was found,
tt(false) otherwise.
it() The second prototype: tt(value) is looked up using binary
search in the series of elements implied by the iterator range rangett(first,
last). The elements in the range must have been sorted by the tt(Comparator)
function object. tt(True) is returned if the element was found, tt(false)
otherwise.
)
it() Example:
verbinclude(-a examples/binarysearch.cc)
)
|