Fixed checkstyle warnings.

This commit is contained in:
Luc Maisonobe 2015-12-25 13:22:23 +01:00
parent 030b9a7234
commit dd9cb37df5
1 changed files with 10 additions and 9 deletions

View File

@ -45,6 +45,15 @@ public final class CombinatoricsUtils {
/** Stirling numbers of the second kind. */
static final AtomicReference<long[][]> STIRLING_S2 = new AtomicReference<long[][]> (null);
/**
* Default implementation of {@link #factorialLog(int)} method:
* <ul>
* <li>No pre-computation</li>
* <li>No cache allocation</li>
* </ul>
*/
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:
* <ul>
* <li>No pre-computation</li>
* <li>No cache allocation</li>
* </ul>
*/
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);