jltsiren / simple-sds

Simple succinct data structures (in Rust)
MIT License
45 stars 7 forks source link

Refactor wavelet matrix #14

Closed jltsiren closed 1 year ago

jltsiren commented 1 year ago

Refactor the core functionality of WaveletMatrix into WMCore. The structure provides bidirectional mapping between the items in the original vector and the same items in the reordered vector that has been sorted stably by the reverse binary representation of the items. Mapping down means mapping from the original vector to the reordered vector, and mapping up means mapping from the reordered vector to the original vector.