feat: Use hashmap in bit heap#11
Conversation
bollu
left a comment
There was a problem hiding this comment.
Looking good so far! I requested changes to (a) fix the asymptotics of insert, and (b) use Circuit.const false as a default value, and (c) to make remove robust to the index not existing. This should help make the library API feel nicer to use.
bollu
left a comment
There was a problem hiding this comment.
We're getting there. I request a more idiomatic way of writing get and removeBit so that they'll be easier to prove.
bollu
left a comment
There was a problem hiding this comment.
Almost! I requested a change to addBit where I noticed that we don't compute a index uniquely for a column. I'm happy with everything else
|
Great, can you now split this into multiple files? Example, |
|
@osmanyasar05 when we change from |
|
LGTM, let's merge it, and perform the refactor in the next patch as suggested by @osmanyasar05 . the eventual goal should be to have all of this sorry-free! |
|
BTW, for the imports, what one would do is to have a file called |
I was using the Basic.lean for that purpose, if that's what you mean? |
This PR modifies the bit heap structure so that it now uses hash maps, instead of holding a list of lists.
For now, the columns still hold a List, but we might also change those to use hashsets/arrays.