feat(vector3d, count-hll): fill in Vector3D + per-bucket-HLL CountHll sketch#62
Open
GordonYuanyc wants to merge 2 commits into
Open
feat(vector3d, count-hll): fill in Vector3D + per-bucket-HLL CountHll sketch#62GordonYuanyc wants to merge 2 commits into
GordonYuanyc wants to merge 2 commits into
Conversation
… sketch Flesh out the Vector3D<T> stub to full Vector2D parity: a rows x cols grid where each (row, col) cell is a contiguous `depth`-length bucket. Adds init/from_fn/fill, element + bucket accessors, fast_insert, the fast_query_min/median/max[_with_key] + aggregate family over bucket slices, Nitro hooks, custom serde (recomputes col mask), and Index/IndexMut. Add CountHll<H>: a Count Sketch grid whose cells are per-bucket HyperLogLog sketches (Vector3D<u8>, depth = 2^precision). Each item is routed to one column per row and recorded in that bucket's HLL. Supports estimate() (per-key distinct count, median across rows) and estimate_total_cardinality() (per-row column partition sum), plus register-max merge and msgpack serde. The HLL register/rank math and classic estimator mirror sketches::hll. Purely additive: Vector3D had no real callers, and only a new module + re-export were added. No existing API changed. fmt clean; new code is clippy-clean; all 489 lib + integration tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cargo doc --no-deps -D warnings rejected [`Vector3D<u8>`] because rustdoc cannot resolve a path containing generics. Give the link an explicit target (crate::Vector3D) so the display text keeps the generic. Doc-comment only; no API change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Vector2Dparity: arows × colsgrid where each(row, col)cell is adepth-length bucket. Adds init/from_fn/fill, element + bucket accessors, fast_insert, the fast_query_min/median/max[_with_key] + aggregate family over bucket slices, Nitro hooks, custom serde (recomputes col mask), Index/IndexMut.Vector3D<u8>, depth =2^precision). Each item is routed to one column per row and recorded in that bucket's HLL. Exposesestimate()(per-key distinct, median across rows) andestimate_total_cardinality()(per-row partition sum), plus register-maxmergeand msgpack serde. HLL register/rank + classic estimator mirrorsketches::hll.API impact
Purely additive —
Vector3Dhad no real callers; only a new module + re-export were added. No existing API changed.Checks
cargo fmt --all -- --checkcleanuninlined_format_argslint debt in unrelated files, unaffected by this PR)cargo test --all-features --locked: 489 lib + integration tests pass🤖 Generated with Claude Code