diff -r 40fcfa5bfc32 -r fc549fac0dd0 src/work/jacint/bin_heap.hh --- a/src/work/jacint/bin_heap.hh Sat Mar 20 16:10:26 2004 +0000 +++ b/src/work/jacint/bin_heap.hh Sat Mar 20 16:13:19 2004 +0000 @@ -153,15 +153,16 @@ } void erase(const Key &k) { - rmidx(kim.get(k)); + rmidx(kim[k]); } - const Val get(const Key &k) const { - int idx = kim.get(k); + Val operator[](const Key &k) const { + int idx = kim[k]; return data[idx].second; } + void put(const Key &k, const Val &v) { - int idx = kim.get(k); + int idx = kim[k]; if( idx < 0 ) { push(k,v); } @@ -174,16 +175,16 @@ } void decrease(const Key &k, const Val &v) { - int idx = kim.get(k); + int idx = kim[k]; bubble_up(idx, PairType(k,v)); } void increase(const Key &k, const Val &v) { - int idx = kim.get(k); + int idx = kim[k]; bubble_down(idx, PairType(k,v), data.size()); } state_enum state(const Key &k) const { - int s = kim.get(k); + int s = kim[k]; if( s>=0 ) s=0; return state_enum(s);