Template Function ADS::interpolationSearch(const std::vector<T>&, const T&, F&&)

Function Documentation

template<class T, class F>
long ADS::interpolationSearch(const std::vector<T> &A, const T &v, F &&trace)

ricercaInterpolata(): the place of v in the sorted A, or -1; trace( i , j , m ) on each probe

Pre:

A is sorted

Post:

the result is -1 if and only if v is not in A