Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java?rev=1591664&r1=1591663&r2=1591664&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java Thu May 1 13:48:02 2014 @@ -47,7 +47,7 @@ public class Precision { /** * Safe minimum, such that {@code 1 / SAFE_MIN} does not overflow. - * <br/> + * <p> * In IEEE 754 arithmetic, this is also the smallest normalized * number 2<sup>-1022</sup>. */ @@ -92,7 +92,7 @@ public class Precision { * @param eps the amount of error to allow when checking for equality * @return <ul><li>0 if {@link #equals(double, double, double) equals(x, y, eps)}</li> * <li>< 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x < y</li> - * <li>> 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x > y</li></ul> + * <li>> 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x > y</li></ul> */ public static int compareTo(double x, double y, double eps) { if (equals(x, y, eps)) { @@ -118,7 +118,7 @@ public class Precision { * values between {@code x} and {@code y}. * @return <ul><li>0 if {@link #equals(double, double, int) equals(x, y, maxUlps)}</li> * <li>< 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x < y</li> - * <li>> 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x > y</li></ul> + * <li>> 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x > y</li></ul> */ public static int compareTo(final double x, final double y, final int maxUlps) { if (equals(x, y, maxUlps)) {
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java?rev=1591664&r1=1591663&r2=1591664&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java Thu May 1 13:48:02 2014 @@ -22,8 +22,8 @@ import java.util.Arrays; import org.apache.commons.math3.exception.MathIllegalArgumentException; import org.apache.commons.math3.exception.MathIllegalStateException; import org.apache.commons.math3.exception.MathInternalError; -import org.apache.commons.math3.exception.NullArgumentException; import org.apache.commons.math3.exception.NotStrictlyPositiveException; +import org.apache.commons.math3.exception.NullArgumentException; import org.apache.commons.math3.exception.NumberIsTooSmallException; import org.apache.commons.math3.exception.util.LocalizedFormats; @@ -220,7 +220,6 @@ public class ResizableDoubleArray implem * <li>{@code expansionMode = MULTIPLICATIVE}</li> * <li>{@code contractionCriterion = 0.5 + expansionFactor}</li> * </ul> - * <br/> * Throws IllegalArgumentException if the following conditions are * not met: * <ul> @@ -251,7 +250,6 @@ public class ResizableDoubleArray implem * <li>{@code expansionMode = MULTIPLICATIVE}</li> * <li>{@code contractionCriterion = 0.5 + expansionFactor}</li> * </ul> - * <br/> * Throws IllegalArgumentException if the following conditions are * not met: * <ul> @@ -277,7 +275,7 @@ public class ResizableDoubleArray implem * Creates an instance with the specified initialCapacity, * expansionFactor, and contractionCriterion. * The expansion mode will default to {@code MULTIPLICATIVE}. - * <br/> + * <p> * Throws IllegalArgumentException if the following conditions are * not met: * <ul> @@ -308,7 +306,7 @@ public class ResizableDoubleArray implem * Creates an instance with the specified initial capacity, * expansion factor, and contraction criteria. * The expansion mode will default to {@code MULTIPLICATIVE}. - * <br/> + * <p> * Throws IllegalArgumentException if the following conditions are * not met: * <ul> @@ -318,8 +316,7 @@ public class ResizableDoubleArray implem * </ul> * * @param initialCapacity Initial size of the internal storage array.. - * @param expansionFactor The array will be expanded based on this - * parameter. + * @param expansionFactor The array will be expanded based on this parameter. * @param contractionCriterion Contraction criterion. * @throws MathIllegalArgumentException if the parameters are not valid. * @since 3.1 @@ -336,18 +333,17 @@ public class ResizableDoubleArray implem } /** - * <p> - * Create a ResizableArray with the specified properties.</p> + * Create a ResizableArray with the specified properties. * <p> * Throws IllegalArgumentException if the following conditions are * not met: * <ul> - * <li><code>initialCapacity > 0</code></li> - * <li><code>expansionFactor > 1</code></li> - * <li><code>contractionFactor >= expansionFactor</code></li> + * <li><code>initialCapacity > 0</code></li> + * <li><code>expansionFactor > 1</code></li> + * <li><code>contractionFactor ≥ expansionFactor</code></li> * <li><code>expansionMode in {MULTIPLICATIVE_MODE, ADDITIVE_MODE}</code> * </li> - * </ul></p> + * </ul> * * @param initialCapacity the initial size of the internal storage array * @param expansionFactor the array will be expanded based on this @@ -376,12 +372,12 @@ public class ResizableDoubleArray implem /** * Creates an instance with the specified properties. - * <br/> + * <p> * Throws MathIllegalArgumentException if the following conditions are * not met: * <ul> - * <li>{@code initialCapacity > 0}</li> - * <li>{@code expansionFactor > 1}</li> + * <li>{@code initialCapacity > 0}</li> + * <li>{@code expansionFactor > 1}</li> * <li>{@code contractionCriterion >= expansionFactor}</li> * </ul> * @@ -419,9 +415,9 @@ public class ResizableDoubleArray implem /** * Copy constructor. Creates a new ResizableDoubleArray that is a deep, - * fresh copy of the original. Needs to acquire synchronization lock - * on original. Original may not be null; otherwise a {@link NullArgumentException} - * is thrown. + * fresh copy of the original. Needs to acquire synchronization lock on original. + * <p> + * Original may not be null; otherwise a {@link NullArgumentException} is thrown. * * @param original array to copy * @exception NullArgumentException if original is null @@ -465,12 +461,10 @@ public class ResizableDoubleArray implem * Adds an element to the end of the array and removes the first * element in the array. Returns the discarded first element. * The effect is similar to a push operation in a FIFO queue. - * </p> * <p> * Example: If the array contains the elements 1, 2, 3, 4 (in that order) * and addElementRolling(5) is invoked, the result is an array containing * the entries 2, 3, 4, 5 and the value returned is 1. - * </p> * * @param value Value to be added to the array. * @return the value which has been discarded or "pushed" out of the array @@ -523,7 +517,7 @@ public class ResizableDoubleArray implem /** * Checks the expansion factor and the contraction criterion and throws an * IllegalArgumentException if the contractionCriteria is less than the - * expansionCriteria + * expansionCriteria. * * @param expansion factor to be checked * @param contraction criteria to be checked @@ -586,8 +580,7 @@ public class ResizableDoubleArray implem /** * Contracts the storage array to the (size of the element set) + 1 - to - * avoid a zero length array. This function also resets the startIndex to - * zero. + * avoid a zero length array. This function also resets the startIndex to zero. */ public synchronized void contract() { final double[] tempArray = new double[numElements + 1]; @@ -878,15 +871,15 @@ public class ResizableDoubleArray implem * Provides <em>direct</em> access to the internal storage array. * Please note that this method returns a reference to this object's * storage array, not a copy. - * <br/> + * <p> * To correctly address elements of the array, the "start index" is * required (available via the {@link #getStartIndex() getStartIndex} * method. - * <br/> + * <p> * This method should only be used to avoid copying the internal array. * The returned value <em>must</em> be used for reading only; other * uses could lead to this object becoming inconsistent. - * <br/> + * <p> * The {@link #getElements} method has no such limitation since it * returns a copy of this array's addressable elements. * @@ -976,11 +969,11 @@ public class ResizableDoubleArray implem * Sets the expansionFactor. Throws IllegalArgumentException if the * the following conditions are not met: * <ul> - * <li><code>expansionFactor > 1</code></li> - * <li><code>contractionFactor >= expansionFactor</code></li> + * <li><code>expansionFactor > 1</code></li> + * <li><code>contractionFactor ≥ expansionFactor</code></li> * </ul> * @param expansionFactor the new expansion factor value. - * @throws MathIllegalArgumentException if expansionFactor is <= 1 or greater + * @throws MathIllegalArgumentException if expansionFactor is ≤ 1 or greater * than contractionFactor * @deprecated As of 3.1 (to be removed in 4.0 as field will become "final"). */ @@ -1102,15 +1095,14 @@ public class ResizableDoubleArray implem } /** - * <p>Copies source to dest, copying the underlying data, so dest is - * a new, independent copy of source. Does not contract before - * the copy.</p> - * - * <p>Obtains synchronization locks on both source and dest - * (in that order) before performing the copy.</p> - * - * <p>Neither source nor dest may be null; otherwise a {@link NullArgumentException} - * is thrown</p> + * Copies source to dest, copying the underlying data, so dest is + * a new, independent copy of source. Does not contract before the copy. + * <p> + * Obtains synchronization locks on both source and dest + * (in that order) before performing the copy. + * <p> + * Neither source nor dest may be null; otherwise a {@link NullArgumentException} + * is thrown. * * @param source ResizableDoubleArray to copy * @param dest ResizableArray to replace with a copy of the source array @@ -1138,7 +1130,7 @@ public class ResizableDoubleArray implem } /** - * Returns a copy of the ResizableDoubleArray. Does not contract before + * Returns a copy of the ResizableDoubleArray. Does not contract before * the copy, so the returned object is an exact copy of this. * * @return a new ResizableDoubleArray with the same data and configuration