Changeset 2547:f393a8162688 in lemon-0.x for lemon/radix_heap.h
- Timestamp:
- 12/27/07 14:40:16 (16 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3424
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/radix_heap.h
r2391 r2547 29 29 namespace lemon { 30 30 31 /// \brief Exception thrown by RadixHeap.32 ///33 /// This Exception is thrown when a smaller priority34 /// is inserted into the \e RadixHeap then the last time erased.35 /// \see RadixHeap36 /// \author Balazs Dezso37 38 class UnderFlowPriorityError : public RuntimeError {39 public:40 virtual const char* what() const throw() {41 return "lemon::UnderFlowPriorityError";42 }43 };44 31 45 32 /// \ingroup auxdata … … 70 57 typedef _ItemIntMap ItemIntMap; 71 58 59 /// \brief Exception thrown by RadixHeap. 60 /// 61 /// This Exception is thrown when a smaller priority 62 /// is inserted into the \e RadixHeap then the last time erased. 63 /// \see RadixHeap 64 /// \author Balazs Dezso 65 66 class UnderFlowPriorityError : public RuntimeError { 67 public: 68 virtual const char* what() const throw() { 69 return "lemon::RadixHeap::UnderFlowPriorityError"; 70 } 71 }; 72 72 73 /// \brief Type to represent the items states. 73 74 /// … … 78 79 /// The ItemIntMap \e should be initialized in such way that it maps 79 80 /// PRE_HEAP (-1) to any element to be put in the heap... 80 enum state_enum{81 enum State { 81 82 IN_HEAP = 0, 82 83 PRE_HEAP = -1, … … 402 403 /// get back to the heap again. 403 404 /// \param i The item. 404 state_enumstate(const Item &i) const {405 State state(const Item &i) const { 405 406 int s = iim[i]; 406 407 if( s >= 0 ) s = 0; 407 return state_enum(s);408 return State(s); 408 409 } 409 410 … … 415 416 /// \param i The item. 416 417 /// \param st The state. It should not be \c IN_HEAP. 417 void state(const Item& i, state_enumst) {418 void state(const Item& i, State st) { 418 419 switch (st) { 419 420 case POST_HEAP:
Note: See TracChangeset
for help on using the changeset viewer.