COIN-OR::LEMON - Graph Library

Changeset 2548:a3ba22ebccc6 in lemon-0.x for lemon/bin_heap.h


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

Edmond's Blossom shrinking algroithm:
MaxWeightedMatching?
MaxWeightedPerfectMatching?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bin_heap.h

    r2547 r2548  
    5353
    5454  public:
     55    ///\e
    5556    typedef _ItemIntMap ItemIntMap;
     57    ///\e
    5658    typedef _Prio Prio;
     59    ///\e
    5760    typedef typename ItemIntMap::Key Item;
     61    ///\e
    5862    typedef std::pair<Item,Prio> Pair;
     63    ///\e
    5964    typedef _Compare Compare;
    6065
     
    322327    }
    323328
     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
    324342  }; // class BinHeap
    325343 
Note: See TracChangeset for help on using the changeset viewer.