You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2024/03/07 18:56:56 UTC
(datasketches-java) 01/01: style fixes
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch tdigest
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git
commit 9f77641b1141d80b2395f6ce65f040eda80e6c18
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Thu Mar 7 10:56:44 2024 -0800
style fixes
---
.../java/org/apache/datasketches/tdigest/TDigestDouble.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java b/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java
index c8fd9af1..a2417f87 100644
--- a/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java
+++ b/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java
@@ -72,7 +72,7 @@ public final class TDigestDouble {
private static final int COMPAT_DOUBLE = 1;
private static final int COMPAT_FLOAT = 2;
- enum Flags { IS_EMPTY, IS_SINGLE_VALUE, REVERSE_MERGE };
+ enum Flags { IS_EMPTY, IS_SINGLE_VALUE, REVERSE_MERGE }
/**
* Constructor with the default K
@@ -308,9 +308,9 @@ public final class TDigestDouble {
wbuf.putByte((byte) Family.TDIGEST.getID());
wbuf.putShort(k_);
wbuf.putByte((byte) (
- (isEmpty() ? 1 << Flags.IS_EMPTY.ordinal() : 0) |
- (isSingleValue() ? 1 << Flags.IS_SINGLE_VALUE.ordinal() : 0) |
- (reverseMerge_ ? 1 << Flags.REVERSE_MERGE.ordinal() : 0)
+ (isEmpty() ? 1 << Flags.IS_EMPTY.ordinal() : 0)
+ | (isSingleValue() ? 1 << Flags.IS_SINGLE_VALUE.ordinal() : 0)
+ | (reverseMerge_ ? 1 << Flags.REVERSE_MERGE.ordinal() : 0)
));
wbuf.putShort((short) 0); // unused
if (isEmpty()) { return bytes; }
@@ -600,7 +600,7 @@ public final class TDigestDouble {
* The use of a normalizing function results in a strictly bounded number of clusters no matter how many samples.
* Corresponds to K_2 in the reference implementation
*/
- private static class ScaleFunction {
+ private static final class ScaleFunction {
static double k(final double q, final double normalizer) {
return limit(new Function<Double, Double>() {
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org