tisonkun opened a new pull request, #375:
URL: https://github.com/apache/datasketches-rust/pull/375

   Closes #365
   
   ## Summary
   
   Standardizes stream-weight and retained-entry inspector method names across 
sketches and documents the crate's inspector naming conventions.
   
   ## Changes
   
   - Rename `KllSketch::n` and `ReqSketch::n` to `total_weight(&self) -> u64`, 
matching `FrequentItemsSketch`, `TDigest`, `TDigestMut`, and the quantile 
sorted views (`CountMinSketch::<T>::total_weight` remains `T` for signed/scaled 
counters). Update `fmt::Debug` output, doctests, and `KllSketch`'s internal 
`levels_weight` helper.
   - Rename `FrequentItemsSketch::num_active_items` to `num_retained(&self) -> 
usize`, updating `fmt::Debug` output, documentation, and internal serialization 
callers.
   - Add `TDigestMut::num_retained(&self) -> usize` and 
`TDigest::num_retained(&self) -> usize`, and update `TDigest`'s `fmt::Debug` 
field from `num_centroids` to `num_retained`.
   - Keep `SortedView::len(&self) -> usize` for slice-like snapshot views and 
`min_item`/`max_item` vs `min_value`/`max_value` matching item vs `f64` value 
APIs.
   - Document the finalized naming rules in `CONTRIBUTING.md` under `## 
Inspector naming`, update `CHANGELOG.md` under `## Unreleased`, update 
integration test callers, and add coverage for `TDigestMut::num_retained` and 
`TDigest::num_retained`.
   
   ## Verification
   
   - `cargo x lint`
   - `cargo x check`
   - `cargo x test`
   - `cargo x bench -- --test`
   - `cargo +1.86.0 check --workspace --all-targets`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to