You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by ti...@apache.org on 2026/07/25 13:45:36 UTC

(datasketches-rust) 06/13: refactor(theta): align union builder parameter names

This is an automated email from the ASF dual-hosted git repository.

tisonkun pushed a commit to branch codex/naming-drift-audit
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git

commit d0737749510fe97562fa0eadc2dc8636dd025e56
Author: tison <wa...@gmail.com>
AuthorDate: Sat Jul 25 21:42:23 2026 +0800

    refactor(theta): align union builder parameter names
---
 datasketches/src/theta/union.rs | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/datasketches/src/theta/union.rs b/datasketches/src/theta/union.rs
index 9bded2e..71bd5dc 100644
--- a/datasketches/src/theta/union.rs
+++ b/datasketches/src/theta/union.rs
@@ -111,16 +111,16 @@ impl ThetaUnionBuilder {
     }
 
     /// Set resize factor.
-    pub fn resize_factor(mut self, resize_factor: ResizeFactor) -> Self {
-        self.resize_factor = resize_factor;
+    pub fn resize_factor(mut self, factor: ResizeFactor) -> Self {
+        self.resize_factor = factor;
         self
     }
 
-    /// Set sampling probability p.
+    /// Set sampling probability.
     ///
     /// # Panics
     ///
-    /// Panics if p is not in range `(0.0, 1.0]`
+    /// Panics if probability is not in range `(0.0, 1.0]`
     ///
     /// # Examples
     ///
@@ -130,12 +130,12 @@ impl ThetaUnionBuilder {
     ///     .sampling_probability(0.5)
     ///     .build();
     /// ```
-    pub fn sampling_probability(mut self, p: f32) -> Self {
+    pub fn sampling_probability(mut self, probability: f32) -> Self {
         assert!(
-            (0.0..=1.0).contains(&p) && p > 0.0,
-            "sampling_probability must be in (0.0, 1.0], got {p}"
+            (0.0..=1.0).contains(&probability) && probability > 0.0,
+            "sampling_probability must be in (0.0, 1.0], got {probability}"
         );
-        self.sampling_probability = p;
+        self.sampling_probability = probability;
         self
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org