Template Function ADS::argmin

Function Documentation

template<class T, class C = std::less<>>
std::size_t ADS::argmin(const std::vector<T> &A, std::size_t start, std::size_t end, C less = C())

argmin(): the place of the first minimum of A[ start .

. end ]

Pre:

start <= end < n

Post:

no item of A[ start .. end ] is smaller than A[ pos ]