You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The data structure also supports an efficient `occs_range` operation:
169
+
-`occs_range(range)` returns an iterator over pairs `(symbol, count)` for all symbols occurring in the given range of positions.
170
+
171
+
This operation efficiently computes the distribution of symbol occurrences within a range by traversing only the tree nodes corresponding to symbols actually present, achieving O(k log σ) time complexity where k is the number of distinct symbols in the range. This feature was contributed by Eric Izoita ([@nytopop](https://github.com/nytopop)).
172
+
173
+
```rust
174
+
useqwt::{QWT256, OccsRangeUnsigned};
175
+
176
+
letdata=vec![1u8, 0, 1, 0, 2, 4, 5, 3];
177
+
letqwt=QWT256::from(data);
178
+
179
+
// Count occurrences of each symbol in the range [2..6)
0 commit comments