-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement rank/select bit vector trait #19
Comments
@hirosassa Thank you for your suggestion! As you said, such traits are essential for scaling up the crate, not only for rank/select on bit vectors but also for compressed integer vectors, selection data structures and so on. But, this library currently contains only NOTE: If we were to implement such traits, it would be better to separate rank and select queries as follows, because there are also data structures that support only one of the queries such as trait Ranker {
fn rank0(&self, pos: usize) -> usize;
fn rank1(&self, pos: usize) -> usize;
}
trait Selector {
fn select0(&self, k: usize) -> usize;
fn select1(&self, k: usize) -> usize;
} |
Agreed 👍 So, I'll implement |
Many thanks! |
Related to #13
There are several implementations of rank/select bit vector data structure,
and some of them have already been / will be implemented in this library.
Since there are data structures, like
wavelet matrix
, uses rank/select bit vector as a building block,it is better that implementing
trait
for rank/select bit vector as below and let user be able to choose concrete implementations:@kampersanda How do you think about above? If it is roughly OK, I will create PR to discuss this more concretely.
The text was updated successfully, but these errors were encountered: