Template Function ADS::kWayMerge

Function Documentation

template<class T, class C = std::less<>>
std::vector<T> ADS::kWayMerge(const std::vector<std::vector<T>> &R, C less = C())

the items of the sorted vectors R, merged through a tree of losers

Pre:

each vector of R sorted

Post:

the items of R, sorted (an audit)