• Advertisement
Sign in to follow this  

Alternatives for std::heap?

This topic is 525 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

 

I am currently converting the JPS pathfinding code from C++ to Delphi and the code I'm converting uses the std::heap to manage the open node list.

 

Now, I never used the heap before and I was wondering what structure in Delphi I could use in its place or if there was a heap class for Delphi anyone had already done.

 

My knowledge of the STD is kinda abysmal as I usually never need to use it in my daily work, so any help on this would be met with untold gratitudes ;)

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I am sure what ApochPiQ said is right. Also, if you learn how a priority queue is implemented, you'll realize that std::heap is basically std::vector with some different interface thrown on top. You could very well reproduce that in Delphi.

Share this post


Link to post
Share on other sites

Ah, indeed!

 

Thanks to you both. "Priority queue" lead me in the right direction and I now have it working. Now to test it and continue on my merry way!

 

:D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement