Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][heap] Which heap to use.
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2016-09-27 11:55:11


Hi,

> You've understood my question to a t. What I wanted was that link, but
> one don't get to that page from
> http://www.boost.org/doc/libs/1_61_0/doc/html/heap.html, which seems
> (to me) to be a (slight) problem. In the meanwhile I think I got
> (wrote) a better solution, as posted. Thanks for the post/response.

Your solution has linear complexity, while the heaps provided have
logarithmic complexity. (insertion in the middle of a vector is a linear
time operation). That is hardly better.

For your case, boost::heap::priority_queue is perfect.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net