1.1 --- a/src/include/bin_heap.hh Sat Mar 20 11:32:44 2004 +0000
1.2 +++ b/src/include/bin_heap.hh Sat Mar 20 13:48:04 2004 +0000
1.3 @@ -108,7 +108,7 @@
1.4 private:
1.5 static int parent(int i) { return (i-1)/2; }
1.6 static int second_child(int i) { return 2*i+2; }
1.7 - bool less(const PairType &p1, const PairType &p2) {
1.8 + bool less(const PairType &p1, const PairType &p2) const {
1.9 return comp(p1.second, p2.second);
1.10 }
1.11
1.12 @@ -156,10 +156,13 @@
1.13 rmidx(iim.get(i));
1.14 }
1.15
1.16 - const Prio get(const Item &i) const {
1.17 + Prio get(const Item &i) const {
1.18 int idx = iim.get(i);
1.19 return data[idx].second;
1.20 }
1.21 + Prio operator[](const Item &i) const {
1.22 + return get(i);
1.23 + }
1.24 void set(const Item &i, const Prio &p) {
1.25 int idx = iim.get(i);
1.26 if( idx < 0 ) {