Template Function ADS::maxDensitySegment

Function Documentation

template<class T>
Segment<T> ADS::maxDensitySegment(const std::vector<T> &D, std::size_t L)

a segment of largest average among those of length at least L, its sum in the result, O( n log n )

Pre:

1 <= L <= the size of D