Changeset 2548:a3ba22ebccc6 in lemon-0.x for lemon/bin_heap.h
- Timestamp:
- 12/28/07 12:00:51 (16 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3425
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bin_heap.h
r2547 r2548 53 53 54 54 public: 55 ///\e 55 56 typedef _ItemIntMap ItemIntMap; 57 ///\e 56 58 typedef _Prio Prio; 59 ///\e 57 60 typedef typename ItemIntMap::Key Item; 61 ///\e 58 62 typedef std::pair<Item,Prio> Pair; 63 ///\e 59 64 typedef _Compare Compare; 60 65 … … 322 327 } 323 328 329 /// \brief Replaces an item in the heap. 330 /// 331 /// The \c i item is replaced with \c j item. The \c i item should 332 /// be in the heap, while the \c j should be out of the heap. The 333 /// \c i item will out of the heap and \c j will be in the heap 334 /// with the same prioriority as prevoiusly the \c i item. 335 void replace(const Item& i, const Item& j) { 336 int idx = iim[i]; 337 iim.set(i, iim[j]); 338 iim.set(j, idx); 339 data[idx].first = j; 340 } 341 324 342 }; // class BinHeap 325 343
Note: See TracChangeset
for help on using the changeset viewer.