BinaryHeap usage

2010-12-14 Thread Matthias Walter
Hi all, suppose I have an array of comparable Foo structs which I want to access in a sorted order (e.g. a priority queue) using a BinaryHeap object (I know that for just sorting, the BinHeap is not the right tools), but I do not want to change the order of the objects in the original array. I ha

Re: BinaryHeap usage

2010-12-14 Thread bearophile
Matthias Walter: > Any further ideas for this problem, or did I cover everything already? For a C programmer the solution with pointers seems more natural, for a Pascal-family programmer the solution with indexes seems more natural, a bit safer (and it is probably just as fast). A third possibl