CheckStyle.

Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/d011f8be
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/d011f8be
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/d011f8be

Branch: refs/heads/feature__NUMBERS-51__field
Commit: d011f8be2a166e49ebb496a254fff4d74060f818
Parents: 590010c
Author: Gilles Sadowski <gil...@harfang.homelinux.org>
Authored: Tue Jan 30 16:38:48 2018 +0100
Committer: Gilles Sadowski <gil...@harfang.homelinux.org>
Committed: Tue Jan 30 16:38:48 2018 +0100

----------------------------------------------------------------------
 .../commons/numbers/core/ArithmeticUtils.java   | 14 +++++++++-----
 .../numbers/fraction/FractionException.java     |  1 +
 .../apache/commons/numbers/gamma/Digamma.java   |  4 ++--
 .../apache/commons/numbers/gamma/LogBeta.java   |  2 +-
 .../apache/commons/numbers/gamma/LogGamma.java  |  1 +
 .../commons/numbers/gamma/RegularizedGamma.java | 20 ++++++++++++++++----
 6 files changed, 30 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/d011f8be/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/ArithmeticUtils.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/ArithmeticUtils.java
 
b/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/ArithmeticUtils.java
index 13055f2..36a84f5 100644
--- 
a/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/ArithmeticUtils.java
+++ 
b/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/ArithmeticUtils.java
@@ -603,7 +603,7 @@ public final class ArithmeticUtils {
      *
      * @param a Addend.
      * @param b Addend.
-     * @param pattern Pattern to use for any thrown exception.
+     * @param message Pattern to use for any thrown exception.
      * @return the sum {@code a + b}.
      * @throws ArithmeticException if the result cannot be represented
      * as a {@code long}.
@@ -748,16 +748,19 @@ public final class ArithmeticUtils {
         return dividend >= 0L || dividend < divisor ? 0L : 1L;
     }
 
+    /**
+     * Exception.
+     */
     private static class NumbersArithmeticException extends 
ArithmeticException {
         /** Serializable version Id. */
-        private static final long serialVersionUID = -6024911025449780474L;
-
+        private static final long serialVersionUID = 20180130L;
+        /** Argument to construct a message. */
         private final Object[] formatArguments;
 
         /**
          * Default constructor.
          */
-        public NumbersArithmeticException() {
+        NumbersArithmeticException() {
             this("arithmetic exception");
         }
 
@@ -768,11 +771,12 @@ public final class ArithmeticUtils {
          * the error.
          * @param args Arguments.
          */
-        public NumbersArithmeticException(String message, Object ... args) {
+        NumbersArithmeticException(String message, Object ... args) {
             super(message);
             this.formatArguments = args;
         }
 
+        /** {@inheritDoc} */
         @Override
         public String getMessage() {
             return MessageFormat.format(super.getMessage(), formatArguments);

http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/d011f8be/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/FractionException.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/FractionException.java
 
b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/FractionException.java
index 1eea0d6..b89bb42 100644
--- 
a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/FractionException.java
+++ 
b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/FractionException.java
@@ -50,6 +50,7 @@ class FractionException extends ArithmeticException {
         this.formatArguments = formatArguments;
     }
 
+    /** {@inheritDoc} */
     @Override
     public String getMessage() {
         return MessageFormat.format(super.getMessage(), formatArguments);

http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/d011f8be/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Digamma.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Digamma.java
 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Digamma.java
index 4caa4e7..24d329e 100644
--- 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Digamma.java
+++ 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Digamma.java
@@ -19,11 +19,11 @@ package org.apache.commons.numbers.gamma;
 /**
  * <a href="http://en.wikipedia.org/wiki/Digamma_function";>Digamma 
function</a>.
  * <p>
- * It is defined as the logarithmic derivative of the \( \Gamma \) 
+ * It is defined as the logarithmic derivative of the \( \Gamma \)
  * ({@link Gamma}) function:
  * \( \frac{d}{dx}(\ln \Gamma(x)) = \frac{\Gamma^\prime(x)}{\Gamma(x)} \).
  * </p>
- * 
+ *
  * @see Gamma
  */
 public class Digamma {

http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/d011f8be/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogBeta.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogBeta.java
 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogBeta.java
index e29aa30..a1fd6ac 100644
--- 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogBeta.java
+++ 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogBeta.java
@@ -253,7 +253,7 @@ public class LogBeta {
      * @param a First argument.
      * @param b Second argument.
      * @return the value of {@code log(Gamma(b) / Gamma(a + b))}.
-     * @throws NumberIsTooSmallException if {@code a < 0} or {@code b < 10}.
+     * @throws IllegalArgumentException if {@code a < 0} or {@code b < 10}.
      */
     private static double logGammaMinusLogGammaSum(double a,
                                                    double b) {

http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/d011f8be/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogGamma.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogGamma.java
 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogGamma.java
index 9698155..f58a3bc 100644
--- 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogGamma.java
+++ 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/LogGamma.java
@@ -22,6 +22,7 @@ package org.apache.commons.numbers.gamma;
  * Class is immutable.
  */
 public class LogGamma {
+    /** Lanczos constant. */
     private static final double LANCZOS_G = 607d / 128d;
     /** Performance. */
     private static final double HALF_LOG_2_PI = 0.5 * Math.log(2.0 * Math.PI);

http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/d011f8be/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
index 94b79d2..cf35665 100644
--- 
a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
+++ 
b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
@@ -38,7 +38,9 @@ public class RegularizedGamma {
         /**
          * Computes the regularized gamma function \( P(a, x) \).
          *
-         * {@inheritDoc}
+         * @param a Argument.
+         * @param x Argument.
+         * @return \( P(a, x) \).
          */
         public static double value(double a,
                                    double x) {
@@ -64,7 +66,11 @@ public class RegularizedGamma {
          *  </li>
          * </ul>
          *
-         * {@inheritDoc}
+         * @param a Argument.
+         * @param x Argument.
+         * @param epsilon Tolerance in continued fraction evaluation.
+         * @param maxIterations Maximum number of iterations in continued 
fraction evaluation.
+         * @return \( P(a, x) \).
          */
         public static double value(double a,
                                    double x,
@@ -117,7 +123,9 @@ public class RegularizedGamma {
         /**
          * Computes the regularized gamma function \( Q(a, x) = 1 - P(a, x) \).
          *
-         * {@inheritDoc}
+         * @param a Argument.
+         * @param x Argument.
+         * @return \( Q(a, x) \).
          */
         public static double value(double a,
                                    double x) {
@@ -140,7 +148,11 @@ public class RegularizedGamma {
          *  </li>
          * </ul>
          *
-         * {@inheritDoc}
+         * @param a Argument.
+         * @param x Argument.
+         * @param epsilon Tolerance in continued fraction evaluation.
+         * @param maxIterations Maximum number of iterations in continued 
fraction evaluation.
+         * @return \( Q(a, x) \).
          */
         public static double value(final double a,
                                    double x,

Reply via email to