Min-Heap and Hash Table help

Chris Pons cmpons at gmail.com
Mon Apr 2 16:42:43 PDT 2012


On Monday, 2 April 2012 at 23:30:38 UTC, Justin Whear wrote:
> On Tue, 03 Apr 2012 01:06:54 +0200, Chris Pons wrote:
>
>> Yes, I did see that. How would I set the predicate to sort by 
>> fScore? An
>> integer in my struct.
>> 
>
> auto myHeap = BinaryHeap!`a.fScore > b.fScore`( rangeOfNodes );

Ok, makes sense, will the heap be automatically sorted every time 
I add a new item ? Might be a dumb question, but i'm going to be 
removing and adding many nodes.


More information about the Digitalmars-d-learn mailing list