COIN-OR::LEMON - Graph Library

Changeset 2547:f393a8162688 in lemon-0.x for lemon/radix_heap.h


Ignore:
Timestamp:
12/27/07 14:40:16 (16 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3424
Message:

Renaming state_enum to State
Removing "Type" suffix from typedefs
Moving implementation into the class definition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/radix_heap.h

    r2391 r2547  
    2929namespace lemon {
    3030
    31   /// \brief Exception thrown by RadixHeap.
    32   /// 
    33   /// This Exception is thrown when a smaller priority
    34   /// is inserted into the \e RadixHeap then the last time erased.
    35   /// \see RadixHeap
    36   /// \author Balazs Dezso
    37 
    38   class UnderFlowPriorityError : public RuntimeError {
    39   public:
    40     virtual const char* what() const throw() {
    41       return "lemon::UnderFlowPriorityError";
    42     } 
    43   };
    4431
    4532  /// \ingroup auxdata
     
    7057    typedef _ItemIntMap ItemIntMap;
    7158
     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
    7273    /// \brief Type to represent the items states.
    7374    ///
     
    7879    /// The ItemIntMap \e should be initialized in such way that it maps
    7980    /// PRE_HEAP (-1) to any element to be put in the heap...
    80     enum state_enum {
     81    enum State {
    8182      IN_HEAP = 0,
    8283      PRE_HEAP = -1,
     
    402403    /// get back to the heap again.
    403404    /// \param i The item.
    404     state_enum state(const Item &i) const {
     405    State state(const Item &i) const {
    405406      int s = iim[i];
    406407      if( s >= 0 ) s = 0;
    407       return state_enum(s);
     408      return State(s);
    408409    }
    409410
     
    415416    /// \param i The item.
    416417    /// \param st The state. It should not be \c IN_HEAP.
    417     void state(const Item& i, state_enum st) {
     418    void state(const Item& i, State st) {
    418419      switch (st) {
    419420      case POST_HEAP:
Note: See TracChangeset for help on using the changeset viewer.