COIN-OR::LEMON - Graph Library

Changeset 214:44f01e580f16 in lemon-0.x for src/include/bin_heap.hh


Ignore:
Timestamp:
03/20/04 14:48:04 (20 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@309
Message:

Feluton az uj map stilus fele.
Nehany const javitas.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/include/bin_heap.hh

    r172 r214  
    109109    static int parent(int i) { return (i-1)/2; }
    110110    static int second_child(int i) { return 2*i+2; }
    111     bool less(const PairType &p1, const PairType &p2) {
     111    bool less(const PairType &p1, const PairType &p2) const {
    112112      return comp(p1.second, p2.second);
    113113    }
     
    157157    }
    158158
    159     const Prio get(const Item &i) const {
     159    Prio get(const Item &i) const {
    160160      int idx = iim.get(i);
    161161      return data[idx].second;
     162    }
     163    Prio operator[](const Item &i) const {
     164      return get(i);
    162165    }
    163166    void set(const Item &i, const Prio &p) {
Note: See TracChangeset for help on using the changeset viewer.