Question: Method to set the priority of a queue element without having to pop and push with new priority again.
So far the only way I see is popping the element and pushing it back again with new priority. This might be expensive if element is not the top. Is there a way to achieve this at the moment or if not, it'll be a good feature to have as priority change is very common for a queue element. So the trade off of not having this feature is again ending up making it expensive for the systems like mine where I absolutely need to update the priority of elements frequently. It'll be really useful feature for me or in fact for most of the users if it can be added.
Thanks.
Hi @surenderk2009, I am very aware of the issue, but as I mention in a a note of the README:
It is worth mentioning that, due to how priority queue are implemented by the C++ standard library, this implementation can't efficiently support priority changes. In any case, to support this feature would require important changes in the current API
To the best of my understanding, to accomodate for this change I would have to totally change the implementation and forego using the standard c++ queuing library. I have not the time right now. If you want to contribute to it, I can help you out with the development though.
Yes. I saw that. I was wondering how much effort would it be to implement it but I understand now. For now, I was able to get through my situation using some other way. But I'll look into this and see if I can find some time to contribute. I'll close the issue for now and get in touch with you when I can collaborate with you on this. Thanks.