From dd9cb37df54a3016e8efb283732012ae14bea1cf Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Fri, 25 Dec 2015 13:22:23 +0100 Subject: [PATCH] Fixed checkstyle warnings. --- .../math4/util/CombinatoricsUtils.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/math4/util/CombinatoricsUtils.java b/src/main/java/org/apache/commons/math4/util/CombinatoricsUtils.java index 019a80f70..ea5a54056 100644 --- a/src/main/java/org/apache/commons/math4/util/CombinatoricsUtils.java +++ b/src/main/java/org/apache/commons/math4/util/CombinatoricsUtils.java @@ -45,6 +45,15 @@ public final class CombinatoricsUtils { /** Stirling numbers of the second kind. */ static final AtomicReference STIRLING_S2 = new AtomicReference (null); + /** + * Default implementation of {@link #factorialLog(int)} method: + *
    + *
  • No pre-computation
  • + *
  • No cache allocation
  • + *
+ */ + private static final FactorialLog FACTORIAL_LOG_NO_CACHE = FactorialLog.create(); + /** Private constructor (class contains only static methods). */ private CombinatoricsUtils() {} @@ -308,15 +317,6 @@ public final class CombinatoricsUtils { return FastMath.floor(FastMath.exp(CombinatoricsUtils.factorialLog(n)) + 0.5); } - /** - * Default implementation of {@link #factorialLog(int)} method: - *
    - *
  • No pre-computation
  • - *
  • No cache allocation
  • - *
- */ - private static final FactorialLog FACTORIAL_LOG_NO_CACHE = FactorialLog.create(); - /** * Compute the natural logarithm of the factorial of {@code n}. * @@ -505,6 +505,7 @@ public final class CombinatoricsUtils { /** * Creates an instance with no precomputed values. + * @return instance with no precomputed values */ public static FactorialLog create() { return new FactorialLog(0, null);