Skip to content

Commit

Permalink
docs: add missing docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
vivienm committed Jul 16, 2023
1 parent a3eeb6a commit d49024c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,21 @@ impl TDigestBuilder {
}
}

/// Sets the compression parameter of the `TDigest`. Defaults to 0.01.
pub fn epsilon(&mut self, epsilon: f32) -> &mut Self {
self.config.epsilon = epsilon;
self
}

/// Sets the maximum number of centroids that the `TDigest` will store.
/// Defaults to 2048.
pub fn max_centroids(&mut self, max_centroids: usize) -> &mut Self {
self.config.max_centroids = max_centroids;
self
}

/// Sets the maximum number of unmerged centroids that the `TDigest` will
/// store. Defaults to 2048.
pub fn max_unmerged(&mut self, max_unmerged: usize) -> &mut Self {
self.config.max_unmerged = max_unmerged;
self
Expand Down

0 comments on commit d49024c

Please sign in to comment.