Closed vigna closed 4 months ago
I think it's reasonable, I don't know if we might want a same index to handle both explicit bit vectors and implicit representations of it. The other options is just to make specialised indices that can be used when the underlying data is a bitvector
Presently we just decided to forward BitLength
+ Index<usize, Output = bool>
, as it provides full functionality. It might be interesting to move some of the code of BitVec to a trait based on those two traits and AsRef<[usize]>
, as that would make full bitvector functionality available.
Closing the issue as for maximum performance we presently have only AsRef<[usize]>-based bit vectors.
At the moment, one can functorially add rank, select and zero-select structures incrementally, and delegation methods make it possible to access all functionality of such structures. However, the only delegation of the lower level (bit vector) are the length and
AsRef<[usize]>
. It would be natural to have a bit vector trait and delegate the corresponding method throughout all structures.