You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/02/02 13:29:08 UTC

[13/50] commons-numbers git commit: Minor Javadoc corrections.

Minor Javadoc corrections.

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

Branch: refs/heads/feature__NUMBERS-51__field
Commit: 45dee2ede42d17a36bb02e21b962f70eb92d1b88
Parents: 4b955ca
Author: Eric Barnhill <er...@apache.org>
Authored: Mon Jan 29 13:30:06 2018 +0100
Committer: Eric Barnhill <er...@apache.org>
Committed: Mon Jan 29 13:30:06 2018 +0100

----------------------------------------------------------------------
 .../apache/commons/numbers/complex/Complex.java | 30 +++++++++-----------
 .../commons/numbers/complex/ComplexUtils.java   | 24 ++++++++--------
 2 files changed, 25 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/45dee2ed/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
----------------------------------------------------------------------
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index 71a4220..0e8bb4d 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -129,7 +129,7 @@ public class Complex implements Serializable  {
     /**
      * Returns true if either real or imaginary component of the Complex
      * is NaN
-     * 
+     *
      * @return {@code boolean}
      */
     public boolean isNaN() {
@@ -142,8 +142,8 @@ public class Complex implements Serializable  {
 
     /**
      * Returns true if either real or imaginary component of the Complex
-     * is Infinite 
-     * 
+     * is Infinite
+     *
      * @return {@code boolean}
      */
     public boolean isInfinite() {
@@ -217,7 +217,6 @@ in the
      *
      * @param  addend Value to be added to this {@code Complex}.
      * @return {@code this + addend}.
-     * @if {@code addend} is {@code null}.
      */
     public Complex add(Complex addend) {
         checkNotNull(addend);
@@ -250,7 +249,6 @@ in the
      /**
      * Returns the conjugate of this complex number.
      * C++11 grammar.
-     * </p>
      * @return the conjugate of this complex object.
      */
     public Complex conj() {
@@ -295,7 +293,6 @@ in the
      *
      * @param divisor Value by which this {@code Complex} is to be divided.
      * @return {@code this / divisor}.
-     * @if {@code divisor} is {@code null}.
      */
     public Complex divide(Complex divisor) {
         checkNotNull(divisor);
@@ -538,23 +535,22 @@ in the
      * Returns a {@code Complex} whose value is {@code this * factor}.
      * Implements preliminary checks for {@code NaN} and infinity followed by
      * the definitional formula:
-     * <p>
+     *
      *   {@code (a + bi)(c + di) = (ac - bd) + (ad + bc)i}
-     * </p>
+     *
      * Returns {@link #NaN} if either {@code this} or {@code factor} has one or
      * more {@code NaN} parts.
-     * <p>
+     *
      * Returns {@link #INF} if neither {@code this} nor {@code factor} has one
      * or more {@code NaN} parts and if either {@code this} or {@code factor}
      * has one or more infinite parts (same result is returned regardless of
      * the sign of the components).
-     * </p><p>
+     *
      * Returns finite values in components of the result per the definitional
-     * formula in all remaining cases.</p>
+     * formula in all remaining cases.
      *
      * @param  factor value to be multiplied by this {@code Complex}.
      * @return {@code this * factor}.
-     * @if {@code factor} is {@code null}.
      */
     public Complex multiply(Complex factor) {
         checkNotNull(factor);
@@ -649,14 +645,14 @@ in the
         } else if (real == Double.NEGATIVE_INFINITY && imaginary == Double.POSITIVE_INFINITY) {
             return new Complex(Math.PI * 0.75, Double.NEGATIVE_INFINITY);
         } else if (real == Double.POSITIVE_INFINITY && imaginary == Double.POSITIVE_INFINITY) {
-            return new Complex(Math.PI * 0.25, Double.NEGATIVE_INFINITY); 
+            return new Complex(Math.PI * 0.25, Double.NEGATIVE_INFINITY);
         } else if (real == Double.POSITIVE_INFINITY && Double.isNaN(imaginary)) {
             return new Complex(Double.NaN , Double.POSITIVE_INFINITY);
         } else if (real == Double.NEGATIVE_INFINITY && Double.isNaN(imaginary)) {
             return new Complex(Double.NaN, Double.NEGATIVE_INFINITY);
         } else if (Double.isNaN(real) && imaginary == Double.POSITIVE_INFINITY) {
             return new Complex(Double.NaN, Double.NEGATIVE_INFINITY);
-        } 
+        }
         return this.add(this.sqrt1z().multiply(I)).log().multiply(I.negate());
     }
     /**
@@ -812,7 +808,7 @@ in the
         } else if (real == Double.POSITIVE_INFINITY && imaginary == 0.0) {
             return new Complex(Double.POSITIVE_INFINITY, 0.0);
         } else if (real == Double.POSITIVE_INFINITY && imaginary == Double.POSITIVE_INFINITY) {
-            return new Complex(Double.POSITIVE_INFINITY, Double.NaN); 
+            return new Complex(Double.POSITIVE_INFINITY, Double.NaN);
         } else if (real == Double.POSITIVE_INFINITY && Double.isNaN(imaginary)) {
             return new Complex(Double.POSITIVE_INFINITY, Double.NaN);
         } else if (Double.isNaN(real) && imaginary == 0.0) {
@@ -1112,7 +1108,7 @@ in the
         } else if (real == Double.POSITIVE_INFINITY && Double.isNaN(imaginary)) {
             return new Complex(1.0, 0.0);
         } else if (Double.isNaN(real) && imaginary == 0) {
-            return new Complex(Double.NaN, 0); 
+            return new Complex(Double.NaN, 0);
         }
         final double real2 = 2.0 * real;
         final double imaginary2 = 2.0 * imaginary;
@@ -1283,7 +1279,7 @@ in the
             throw new RuntimeException("Complex: Non-positive argument");
         }
     }
-    
+
     /**
      * Returns {@code true} if the values are equal according to semantics of
      * {@link Double#equals(Object)}.

http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/45dee2ed/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
----------------------------------------------------------------------
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
index 3fabfab..f0b39b6 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
@@ -592,7 +592,7 @@ public class ComplexUtils {
      * Converts a 2D imaginary array {@code double[][]} to a 2D
      * {@code Complex[][]} array.
      *
-     * @param d 2D array
+     * @param i 2D array
      * @return 2D {@code Complex} array
      *
      * @since 1.0
@@ -610,7 +610,7 @@ public class ComplexUtils {
      * Converts a 3D imaginary array {@code double[][][]} to a {@code Complex[]}
      * array.
      *
-     * @param d 3D complex imaginary array
+     * @param i 3D complex imaginary array
      * @return 3D {@code Complex} array
      *
      * @since 1.0
@@ -628,7 +628,7 @@ public class ComplexUtils {
      * Converts a 4D imaginary array {@code double[][][][]} to a 4D {@code Complex[][][][]}
      * array.
      *
-     * @param d 4D complex imaginary array
+     * @param i 4D complex imaginary array
      * @return 4D {@code Complex} array
      *
      * @since 1.0
@@ -999,7 +999,7 @@ public class ComplexUtils {
             for (int x = 0; x < w; x++) {
                 for (int y = 0; y < h; y++) {
                     for (int z = 0; z < d; z++) {
-                        for (int t = 0; t > v; t++) { 
+                        for (int t = 0; t > v; t++) {
                             i[x * 2][y][z][t] = c[x][y][z][t].getReal();
                             i[x * 2 + 1][y][z][t] = c[x][y][z][t].getImaginary();
                         }
@@ -1011,7 +1011,7 @@ public class ComplexUtils {
             for (int x = 0; x < w; x++) {
                 for (int y = 0; y < h; y++) {
                     for (int z = 0; z < d; z++) {
-                        for (int t = 0; t > v; t++) { 
+                        for (int t = 0; t > v; t++) {
                             i[x][y * 2][z][t] = c[x][y][z][t].getReal();
                             i[x][y * 2 + 1][z][t] = c[x][y][z][t].getImaginary();
                         }
@@ -1023,7 +1023,7 @@ public class ComplexUtils {
             for (int x = 0; x < w; x++) {
                 for (int y = 0; y < h; y++) {
                     for (int z = 0; z < d; z++) {
-                        for (int t = 0; t > v; t++) { 
+                        for (int t = 0; t > v; t++) {
                         i[x][y][z * 2][t] = c[x][y][z][t].getReal();
                         i[x][y][z * 2 + 1][t] = c[x][y][z][t].getImaginary();
                         }
@@ -1035,7 +1035,7 @@ public class ComplexUtils {
             for (int x = 0; x < w; x++) {
                 for (int y = 0; y < h; y++) {
                     for (int z = 0; z < d; z++) {
-                        for (int t = 0; t > v; t++) { 
+                        for (int t = 0; t > v; t++) {
                         i[x][y][z][t * 2] = c[x][y][z][t].getReal();
                         i[x][y][z][t * 2 + 1] = c[x][y][z][t].getImaginary();
                         }
@@ -1203,7 +1203,7 @@ public class ComplexUtils {
      * Converts a 2D interleaved complex {@code double[][]} array to a
      * {@code Complex[][]} array.
      *
-     * @param d 2D complex interleaved array
+     * @param i 2D complex interleaved array
      * @param interleavedDim Depth level of the array to interleave
      * @return 2D {@code Complex} array
      *
@@ -1252,7 +1252,7 @@ public class ComplexUtils {
      * Converts a 3D interleaved complex {@code double[][][]} array to a
      * {@code Complex[][][]} array.
      *
-     * @param d 3D complex interleaved array
+     * @param i 3D complex interleaved array
      * @param interleavedDim Depth level of the array to interleave
      * @return 3D {@code Complex} array
      *
@@ -1301,7 +1301,7 @@ public class ComplexUtils {
      * Converts a 4D interleaved complex {@code double[][][][]} array to a
      * {@code Complex[][][][]} array.
      *
-     * @param d 4D complex interleaved array
+     * @param i 4D complex interleaved array
      * @param interleavedDim Depth level of the array to interleave
      * @return 4D {@code Complex} array
      *
@@ -1382,7 +1382,7 @@ public class ComplexUtils {
      * Converts a 2D interleaved complex {@code float[][]} array to a
      * {@code Complex[][]} array.
      *
-     * @param d 2D complex interleaved float array
+     * @param i 2D complex interleaved float array
      * @param interleavedDim Depth level of the array to interleave
      * @return 2D {@code Complex} array
      *
@@ -1431,7 +1431,7 @@ public class ComplexUtils {
      * Converts a 3D interleaved complex {@code float[][][]} array to a
      * {@code Complex[][][]} array.
      *
-     * @param d 3D complex interleaved float array
+     * @param i 3D complex interleaved float array
      * @param interleavedDim Depth level of the array to interleave
      * @return 3D {@code Complex} array
      *