sort_heap complexity guarantee
Jonathan Wakely
jwakely@redhat.com
Wed Oct 8 08:43:00 GMT 2014
On 06/10/14 23:00 +0200, François Dumont wrote:
>Good point, with n calls to pop_heap it means that limit must be
>2*log(1) + 2*log(2) +... + 2*log(n) which is 2*log(n!) and which is
>also necessarily < 2*n*log(n). I guess Standard comittee has forgotten
>the factor 2 in the limit so this is what I am using as limit in the
>final test, unless someone prefer the stricter 2*log(n!) ?
>
>Ok to commit those new tests ?
Yes please - thanks.
More information about the Libstdc++
mailing list