Template Function ADS::localMinimum(const std::vector<T>&, C)
Defined in File LocalOptima.h
Function Documentation
-
template<class T, class C = std::less<>>
std::size_t ADS::localMinimum(const std::vector<T> &A, C less = C()) localMinimum(): the place r of an item of A not larger than its neighbours, by a binary search; \( \lceil \log_2 n \rceil \) comparisons
- Pre:
A is not empty
- Post:
A[ r ] not larger than A[ r - 1 ] and A[ r + 1 ], where they are