Hello,

I am implementing an algorithm that requires a heap.
In my algorithm, I need to do two operations, similar
to that required by Dijkstra's algorithm:

1. Use a secondary array to index the nodes of the
heap. This is so that a node in the heap can be found
in constant time.

2. Decrease the key (priority) of a node in the heap.

The Boost heap implementation
(http://www.boost.org/libs/pri_queue/heap.html)
supports the decrease-key operation. But reading the
documentation, I'm not sure if the first requirement
is satisfied. If I index the nodes using iterators,
then what I require is for these iterators to be valid
even after the heap is changed, eg after insertion,
deletion or decreasing the key. Is that the case? 

Thanks.


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to