Skip to content
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

sparse histogram with cumulative counts with read-only strait #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thinkingfish
Copy link
Member

No description provided.

@@ -19,6 +19,114 @@ pub struct SparseHistogram {
pub count: Vec<u64>,
}

#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
pub struct SparseHistogramRO {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a doc comment for the struct. It'd be nice to have something that explains what it is and when you might use it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if calling it an CumulativeSparseHistogram is clearer. I'm not sure I love the short suffix to indicate read-only. ImmutableSparseHistogram might be better if you want to keep the focus on that aspect instead of how it's implemented.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like CumulativeSparseHistogram, we can explain why it only supports the read methods in the doc comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants