This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sort_heap complexity guarantee


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]