Sign in to follow this  
Eric F.

Alternatives for std::heap?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this