Changeset 214:44f01e580f16 in lemon-0.x for src/include/bin_heap.hh
- Timestamp:
- 03/20/04 14:48:04 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@309
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/include/bin_heap.hh
r172 r214 109 109 static int parent(int i) { return (i-1)/2; } 110 110 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 { 112 112 return comp(p1.second, p2.second); 113 113 } … … 157 157 } 158 158 159 constPrio get(const Item &i) const {159 Prio get(const Item &i) const { 160 160 int idx = iim.get(i); 161 161 return data[idx].second; 162 } 163 Prio operator[](const Item &i) const { 164 return get(i); 162 165 } 163 166 void set(const Item &i, const Prio &p) {
Note: See TracChangeset
for help on using the changeset viewer.