diff -r e308e429bdc9 -r 44f01e580f16 src/include/bin_heap.hh --- a/src/include/bin_heap.hh Sat Mar 20 11:32:44 2004 +0000 +++ b/src/include/bin_heap.hh Sat Mar 20 13:48:04 2004 +0000 @@ -108,7 +108,7 @@ private: static int parent(int i) { return (i-1)/2; } static int second_child(int i) { return 2*i+2; } - bool less(const PairType &p1, const PairType &p2) { + bool less(const PairType &p1, const PairType &p2) const { return comp(p1.second, p2.second); } @@ -156,10 +156,13 @@ rmidx(iim.get(i)); } - const Prio get(const Item &i) const { + Prio get(const Item &i) const { int idx = iim.get(i); return data[idx].second; } + Prio operator[](const Item &i) const { + return get(i); + } void set(const Item &i, const Prio &p) { int idx = iim.get(i); if( idx < 0 ) {