Boost logo

Boost Users :

Subject: Re: [Boost-users] Priority deque?
From: Michael (mwpowellhtx_at_[hidden])
Date: 2016-09-01 09:34:29


On September 1, 2016 4:55:38 AM EDT, Paolo Bolzoni <paolo.bolzoni.brown_at_[hidden]> wrote:
>Dear list,
>
>I was wondering if there some kind of "priority queue", that is a data
>structure akin the priority queue, but where you can top and pop from
>both sides.
>My use case is that I need to quickly access the maximum, but also not
>push new elements if they are smaller than the minimum.

Deque is one of my favorites. Ordered? Unordered?

>I am aware I can use a std::set, but in the current implementation
>where I always push new elements even if they are bad, using a
>std::set the performance is significantly worse.

I'm not sure set is the same thing as an ordered anything (list, vector, queue, deque).

>Yours faithfully,
>Paolo

Regards,

Michael Powell

>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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