Skip to content

Commit 4375a79

Browse files
committed
chore: tidy comment and code of CpcSketch
Signed-off-by: tison <wander4096@gmail.com>
1 parent 29837cc commit 4375a79

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/apache/datasketches/cpc/CpcSketch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ private static void updateWindowed(final CpcSketch sketch, final int rowCol) {
621621
assert ((sketch.windowOffset >= 0) && (sketch.windowOffset <= 56));
622622
final int k = 1 << sketch.lgK;
623623
final long c32pre = sketch.numCoupons << 5;
624-
assert c32pre >= (3L * k); // C < 3K/32, in other words flavor >= HYBRID
624+
assert c32pre >= (3L * k); // C >= 3K/32, in other words flavor >= HYBRID
625625
final long c8pre = sketch.numCoupons << 3;
626626
final int w8pre = sketch.windowOffset << 3;
627627
assert c8pre < ((27L + w8pre) * k); // C < (K * 27/8) + (K * windowOffset)

src/main/java/org/apache/datasketches/cpc/CpcUnion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public CpcUnion(final int lgK, final long seed) {
124124
bitMatrix = null;
125125
// We begin with the accumulator holding an EMPTY_MERGED sketch object.
126126
// As an optimization the accumulator could start as NULL, but that would require changes elsewhere.
127-
accumulator = new CpcSketch(lgK);
127+
accumulator = new CpcSketch(lgK, seed);
128128
}
129129

130130
/**

0 commit comments

Comments
 (0)