This is an automated email from the ASF dual-hosted git repository.
placave pushed a commit to branch cpc-sketch
in repository https://gitbox.apache.org/repos/asf/datasketches-go.git
The following commit(s) were added to refs/heads/cpc-sketch by this push:
new b071524 Add check for LB/UB and lgK
b071524 is described below
commit b0715241670bd844cdac907d422d6ad9ffcd43a5
Author: Pierre Lacave <[email protected]>
AuthorDate: Thu Nov 21 11:41:48 2024 +0100
Add check for LB/UB and lgK
---
cpc/cpc_sketch_test.go | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/cpc/cpc_sketch_test.go b/cpc/cpc_sketch_test.go
index cbc58e1..0c0275e 100644
--- a/cpc/cpc_sketch_test.go
+++ b/cpc/cpc_sketch_test.go
@@ -118,3 +118,18 @@ func TestCPCCheckCornerCaseUpdates(t *testing.T) {
err = sk.UpdateInt64Slice(emptyInt64Slice)
assert.NoError(t, err)
}
+
+func TestCPCCheckLgK(t *testing.T) {
+ sk, err := NewCpcSketch(10, 0)
+ assert.NoError(t, err)
+ assert.Equal(t, sk.lgK, 10)
+ _, err = NewCpcSketch(3, 0)
+ assert.Error(t, err)
+}
+
+func TestCPCcheckIconHipUBLBLg15(t *testing.T) {
+ iconConfidenceUB(15, 1, 2)
+ iconConfidenceLB(15, 1, 2)
+ hipConfidenceUB(15, 1, 1.0, 2)
+ hipConfidenceLB(15, 1, 1.0, 2)
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]