-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: index_of()? #36
Comments
First of all, if you need map, there is https://github.com/tower120/hi_sparse_array - which is basically hi_sparse_bitset but with data at last level + bunch of other improvements. I think I need a month or two to make it crate-ready. But looks like most of the research/design-related issues are solved. Second, what is |
Wait, I think I understand the closest thing you want. You want index of terminal SIMD-BitBlock. But at first, as-is, BitBlocks are not stored contiguously (but they could - that's design choice). And second - well that's block index, you still have to deal with bit inside of it. These questions are addressed in https://github.com/tower120/hi_sparse_array - it's data structure and operation-interface specifically changed to support that. I hope to make hi_sparse_bitset just a special case of https://github.com/tower120/hi_sparse_array one day. |
If there are 73 numbers stored, 1 7 9 42 1893 40958 144938 etc., I want my_bitmap.index_of(1893) to return 4. Didn't know there was hi_sparse_array, it didn't show up on Google or crates.io. |
Anyway, that will be highly inefficient even if it could be retrieved in O(1) time, since you'll have to keep you're |
Just wait for a month or so - I bet hi_sparse_array will do what you want to achieve. |
If by any chance you still need hierarchical bitmap as MAP: https://crates.io/crates/hibit_tree . It is still somewhat unpolished. In doc department, at least. It was renamed from previous hi_sparse_array to better reflect what it actually is. |
I've been looking all over for some kind of key-value store using a hierarchical bitmap, but all I've found are sets. I could make one myself, but I'd need some way to know the index of an element in the set.
For example:
The text was updated successfully, but these errors were encountered: