diff --git a/src/main/java/org/apache/commons/math3/RealFieldElement.java b/src/main/java/org/apache/commons/math3/RealFieldElement.java index 033d65948..f0852d9e3 100644 --- a/src/main/java/org/apache/commons/math3/RealFieldElement.java +++ b/src/main/java/org/apache/commons/math3/RealFieldElement.java @@ -53,7 +53,7 @@ public interface RealFieldElement extends FieldElement { /** '÷' operator. * @param a right hand side parameter of the operator - * @return this÷a + * @return this÷s;a */ T divide(double a); @@ -89,7 +89,7 @@ public interface RealFieldElement extends FieldElement { T floor(); /** Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers. - * @return a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5 + * @return a double number r such that r is an integer r - 0.5 <= this <= r + 0.5 */ T rint(); @@ -131,7 +131,7 @@ public interface RealFieldElement extends FieldElement { /** * Returns the hypotenuse of a triangle with sides {@code this} and {@code y} - * - sqrt(this2 +y2) + * - sqrt(this2 +y2)
* avoiding intermediate overflow or underflow. * *
    diff --git a/src/main/java/org/apache/commons/math3/complex/Complex.java b/src/main/java/org/apache/commons/math3/complex/Complex.java index 75d9ccd29..52f3047b2 100644 --- a/src/main/java/org/apache/commons/math3/complex/Complex.java +++ b/src/main/java/org/apache/commons/math3/complex/Complex.java @@ -32,7 +32,7 @@ import org.apache.commons.math3.util.Precision; /** * Representation of a Complex number, i.e. a number which has both a * real and imaginary part. - *

    + *
    * Implementations of arithmetic operations handle {@code NaN} and * infinite values according to the rules for {@link java.lang.Double}, i.e. * {@link #equals} is an equivalence relation for all instances that have @@ -50,7 +50,7 @@ import org.apache.commons.math3.util.Precision; * equals for primitive double} in {@link org.apache.commons.math3.util.Precision} * conforms with IEEE-754 while this class conforms with the standard behavior * for Java object types. - *

    + *
    * Implements Serializable since 2.0 * * @version $Id$ @@ -144,7 +144,7 @@ public class Complex implements FieldElement, Serializable { * (a + bi) + (c + di) = (a+c) + (b+d)i * * - *

    + *
    * If either {@code this} or {@code addend} has a {@code NaN} value in * either part, {@link #NaN} is returned; otherwise {@code Infinite} * and {@code NaN} values are returned in the parts of the result @@ -183,10 +183,10 @@ public class Complex implements FieldElement, Serializable { /** * Return the conjugate of this complex number. * The conjugate of {@code a + bi} is {@code a - bi}. - *

    + *
    * {@link #NaN} is returned if either the real or imaginary * part of this Complex number equals {@code Double.NaN}. - *

    + *
    * If the imaginary part is infinite, and the real part is not * {@code NaN}, the returned value has infinite imaginary part * of the opposite sign, e.g. the conjugate of @@ -217,7 +217,7 @@ public class Complex implements FieldElement, Serializable { * * prescaling of operands to limit the effects of overflows and * underflows in the computation. - *

    + *
    * {@code Infinite} and {@code NaN} values are handled according to the * following rules, applied in the order presented: *

      @@ -508,12 +508,12 @@ public class Complex implements FieldElement, Serializable { * * Returns {@link #NaN} if either {@code this} or {@code factor} has one or * more {@code NaN} parts. - *

      + *
      * 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). - *

      + *
      * Returns finite values in components of the result per the definitional * formula in all remaining cases. * @@ -724,10 +724,10 @@ public class Complex implements FieldElement, Serializable { * where the (real) functions on the right-hand side are * {@link FastMath#sin}, {@link FastMath#cos}, * {@link FastMath#cosh} and {@link FastMath#sinh}. - *

      + *
      * Returns {@link Complex#NaN} if either real or imaginary part of the * input argument is {@code NaN}. - *

      + *
      * Infinite values in real or imaginary parts of the input may result in * infinite or NaN values returned in parts of the result. *

      diff --git a/src/main/java/org/apache/commons/math3/geometry/enclosing/WelzlEncloser.java b/src/main/java/org/apache/commons/math3/geometry/enclosing/WelzlEncloser.java
      index 830bf4a28..12a645f43 100644
      --- a/src/main/java/org/apache/commons/math3/geometry/enclosing/WelzlEncloser.java
      +++ b/src/main/java/org/apache/commons/math3/geometry/enclosing/WelzlEncloser.java
      @@ -32,10 +32,10 @@ import org.apache.commons.math3.geometry.Space;
        * href="http://www.inf.ethz.ch/personal/gaertner/texts/own_work/esa99_final.pdf">Fast and
        * Robust Smallest Enclosing Balls, by Bernd Gärtner and further modified in
        * paper 
      + * href=http://www.idt.mdh.se/kurser/ct3340/ht12/MINICONFERENCE/FinalPapers/ircse12_submission_30.pdf">
        * Efficient Computation of Smallest Enclosing Balls in Three Dimensions by Linus Källberg
        * to avoid performing local copies of data have been included.
      - *
      + * 

      * @param Space type. * @param

      Point type. * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java index c74446967..c5c8ecf42 100644 --- a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java +++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java @@ -19,8 +19,8 @@ package org.apache.commons.math3.geometry.euclidean.threed; import java.io.Serializable; -import org.apache.commons.math3.Field; import org.apache.commons.math3.RealFieldElement; +import org.apache.commons.math3.Field; import org.apache.commons.math3.exception.MathArithmeticException; import org.apache.commons.math3.exception.MathIllegalArgumentException; import org.apache.commons.math3.exception.util.LocalizedFormats; @@ -1158,7 +1158,9 @@ public class FieldRotation> implements Serializabl * or very different. It is mathematically defined as the angle of * the rotation r that prepended to one of the rotations gives the other * one:

      - * r1(r) = r2 + *
      +     *        r1(r) = r2
      +     * 
      *

      This distance is an angle between 0 and π. Its value is the smallest * possible upper bound of the angle in radians between r1(v) * and r2(v) for all possible vectors v. This upper bound is diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java index aa378a703..5371054ac 100644 --- a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java +++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java @@ -539,7 +539,7 @@ public class FieldVector3D> implements Serializabl * Vector3D k = u.normalize(); * Vector3D i = k.orthogonal(); * Vector3D j = Vector3D.crossProduct(k, i); - *

      + *

      * @return a new normalized vector orthogonal to the instance * @exception MathArithmeticException if the norm of the instance is null */ diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Rotation.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Rotation.java index 347ee694c..fbdafa306 100644 --- a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Rotation.java +++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Rotation.java @@ -1029,7 +1029,9 @@ public class Rotation implements Serializable { * or very different. It is mathematically defined as the angle of * the rotation r that prepended to one of the rotations gives the other * one:

      - * r1(r) = r2 + *
      +   *        r1(r) = r2
      +   * 
      *

      This distance is an angle between 0 and π. Its value is the smallest * possible upper bound of the angle in radians between r1(v) * and r2(v) for all possible vectors v. This upper bound is diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.java index 2f6ad1777..e57d742d1 100644 --- a/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.java +++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.java @@ -313,7 +313,7 @@ public class Vector3D implements Serializable, Vector { * Vector3D k = u.normalize(); * Vector3D i = k.orthogonal(); * Vector3D j = Vector3D.crossProduct(k, i); - * + *

      * @return a new normalized vector orthogonal to the instance * @exception MathArithmeticException if the norm of the instance is null */ diff --git a/src/main/java/org/apache/commons/math3/geometry/partitioning/Embedding.java b/src/main/java/org/apache/commons/math3/geometry/partitioning/Embedding.java index db6245893..c81ba032a 100644 --- a/src/main/java/org/apache/commons/math3/geometry/partitioning/Embedding.java +++ b/src/main/java/org/apache/commons/math3/geometry/partitioning/Embedding.java @@ -20,28 +20,30 @@ import org.apache.commons.math3.geometry.Point; import org.apache.commons.math3.geometry.Space; /** This interface defines mappers between a space and one of its sub-spaces. - *

      - * Sub-spaces are the lower dimensions subsets of a n-dimensions + + *

      Sub-spaces are the lower dimensions subsets of a n-dimensions * space. The (n-1)-dimension sub-spaces are specific sub-spaces known * as {@link Hyperplane hyperplanes}. This interface can be used regardless * of the dimensions differences. As an example, {@link * org.apache.commons.math3.geometry.euclidean.threed.Line Line} in 3D - * implements Embedding<{@link - * org.apache.commons.math3.geometry.euclidean.threed.Vector3D Vector3D}, {@link - * org.apache.commons.math3.geometry.euclidean.oned.Vector1D Vector1D}>, i.e. it - * maps directly dimensions 3 and 1. - *

      - * In the 3D euclidean space, hyperplanes are 2D planes, and the 1D - * sub-spaces are lines. + * implements Embedding<{@link + * org.apache.commons.math3.geometry.euclidean.threed.Vector3D Vector3D}, {link + * org.apache.commons.math3.geometry.euclidean.oned.Vector1D Vector1D>, i.e. it + * maps directly dimensions 3 and 1.

      + + *

      In the 3D euclidean space, hyperplanes are 2D planes, and the 1D + * sub-spaces are lines.

      + *

      * Note that this interface is not intended to be implemented * by Apache Commons Math users, it is only intended to be implemented * within the library itself. New methods may be added even for minor * versions, which breaks compatibility for external implementations. - * + *

      + * @param Type of the embedding space. * @param Type of the embedded sub-space. - * + * @see Hyperplane * @version $Id$ * @since 3.0 diff --git a/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java b/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java index 382a10456..fa320c5ca 100644 --- a/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java +++ b/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java @@ -44,7 +44,7 @@ import org.apache.commons.math3.util.FastMath; * given range. This is depicted in dimension 2 by the following * picture:

      * - * OrderedTuple + * * *

      This picture shows a set of 100000 random 2-D pairs having their * first component between -50 and +150 and their second component diff --git a/src/main/java/org/apache/commons/math3/geometry/spherical/twod/SphericalPolygonsSet.java b/src/main/java/org/apache/commons/math3/geometry/spherical/twod/SphericalPolygonsSet.java index 46b610c39..669ae4986 100644 --- a/src/main/java/org/apache/commons/math3/geometry/spherical/twod/SphericalPolygonsSet.java +++ b/src/main/java/org/apache/commons/math3/geometry/spherical/twod/SphericalPolygonsSet.java @@ -431,7 +431,7 @@ public class SphericalPolygonsSet extends AbstractRegion { *

            *   // compute region, plus an enclosing spherical cap
            *   SphericalPolygonsSet complexShape = ...;
      -     *   EnclosingBall<Sphere2D, S2Point> cap = complexShape.getEnclosingCap();
      +     *   EnclosingBall cap = complexShape.getEnclosingCap();
            *
            *   // check lots of points
            *   for (Vector3D p : points) {
      diff --git a/src/main/java/org/apache/commons/math3/optim/BaseMultiStartMultivariateOptimizer.java b/src/main/java/org/apache/commons/math3/optim/BaseMultiStartMultivariateOptimizer.java
      index adf8c30ef..329dc7506 100644
      --- a/src/main/java/org/apache/commons/math3/optim/BaseMultiStartMultivariateOptimizer.java
      +++ b/src/main/java/org/apache/commons/math3/optim/BaseMultiStartMultivariateOptimizer.java
      @@ -23,7 +23,7 @@ import org.apache.commons.math3.random.RandomVectorGenerator;
       
       /**
        * Base class multi-start optimizer for a multivariate function.
      - * 

      + *
      * This class wraps an optimizer in order to use it several times in * turn with different starting points (trying to avoid being trapped * in a local extremum when looking for a global one). @@ -102,7 +102,7 @@ public abstract class BaseMultiStartMultivariateOptimizer * restarts. The {@code optimize} method returns the best point only. * This method returns all the points found at the end of each starts, * including the best one already returned by the {@code optimize} method. - *

      + *
      * The returned array as one element for each start as specified * in the constructor. It is ordered with the results from the * runs that did converge first, sorted from best to worst @@ -113,7 +113,7 @@ public abstract class BaseMultiStartMultivariateOptimizer * an exception. * This also means that if the first element is not {@code null}, it is * the best point found across all starts. - *

      + *
      * The behaviour is undefined if this method is called before * {@code optimize}; it will likely throw {@code NullPointerException}. * diff --git a/src/main/java/org/apache/commons/math3/optim/ConvergenceChecker.java b/src/main/java/org/apache/commons/math3/optim/ConvergenceChecker.java index 18ca560cf..f0bfab708 100644 --- a/src/main/java/org/apache/commons/math3/optim/ConvergenceChecker.java +++ b/src/main/java/org/apache/commons/math3/optim/ConvergenceChecker.java @@ -20,11 +20,11 @@ package org.apache.commons.math3.optim; /** * This interface specifies how to check if an optimization algorithm has * converged. - *

      + *
      * Deciding if convergence has been reached is a problem-dependent issue. The * user should provide a class implementing this interface to allow the * optimization algorithm to stop its search according to the problem at hand. - *

      + *
      * For convenience, three implementations that fit simple needs are already * provided: {@link SimpleValueChecker}, {@link SimpleVectorValueChecker} and * {@link SimplePointChecker}. The first two consider that convergence is diff --git a/src/main/java/org/apache/commons/math3/optim/InitialGuess.java b/src/main/java/org/apache/commons/math3/optim/InitialGuess.java index 8aa4612b0..32df68df1 100644 --- a/src/main/java/org/apache/commons/math3/optim/InitialGuess.java +++ b/src/main/java/org/apache/commons/math3/optim/InitialGuess.java @@ -19,7 +19,7 @@ package org.apache.commons.math3.optim; /** * Starting point (first guess) of the optimization procedure. - *

      + *
      * Immutable class. * * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/optim/SimpleBounds.java b/src/main/java/org/apache/commons/math3/optim/SimpleBounds.java index 4d26a9e82..6f5dcad1d 100644 --- a/src/main/java/org/apache/commons/math3/optim/SimpleBounds.java +++ b/src/main/java/org/apache/commons/math3/optim/SimpleBounds.java @@ -22,7 +22,7 @@ import java.util.Arrays; * Simple optimization constraints: lower and upper bounds. * The valid range of the parameters is an interval that can be infinite * (in one or both directions). - *

      + *
      * Immutable class. * * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/optim/SimpleValueChecker.java b/src/main/java/org/apache/commons/math3/optim/SimpleValueChecker.java index dc85c5139..094e38018 100644 --- a/src/main/java/org/apache/commons/math3/optim/SimpleValueChecker.java +++ b/src/main/java/org/apache/commons/math3/optim/SimpleValueChecker.java @@ -28,7 +28,7 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; * difference between the objective function values is smaller than a * threshold or if either the absolute difference between the objective * function values is smaller than another threshold. - *

      + *
      * The {@link #converged(int,PointValuePair,PointValuePair) converged} * method will also return {@code true} if the number of iterations has been set * (see {@link #SimpleValueChecker(double,double,int) this constructor}). diff --git a/src/main/java/org/apache/commons/math3/optim/SimpleVectorValueChecker.java b/src/main/java/org/apache/commons/math3/optim/SimpleVectorValueChecker.java index dd7ae6806..737911353 100644 --- a/src/main/java/org/apache/commons/math3/optim/SimpleVectorValueChecker.java +++ b/src/main/java/org/apache/commons/math3/optim/SimpleVectorValueChecker.java @@ -28,7 +28,7 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; * difference between the objective function values is smaller than a * threshold or if either the absolute difference between the objective * function values is smaller than another threshold for all vectors elements. - *

      + *
      * The {@link #converged(int,PointVectorValuePair,PointVectorValuePair) converged} * method will also return {@code true} if the number of iterations has been set * (see {@link #SimpleVectorValueChecker(double,double,int) this constructor}). diff --git a/src/main/java/org/apache/commons/math3/optim/package-info.java b/src/main/java/org/apache/commons/math3/optim/package-info.java index e52502f3e..b6c9fd7fa 100644 --- a/src/main/java/org/apache/commons/math3/optim/package-info.java +++ b/src/main/java/org/apache/commons/math3/optim/package-info.java @@ -17,54 +17,61 @@ /** *

      - * Generally, optimizers are algorithms that will either - * {@link org.apache.commons.math3.optim.nonlinear.scalar.GoalType#MINIMIZE minimize} or - * {@link org.apache.commons.math3.optim.nonlinear.scalar.GoalType#MAXIMIZE maximize} - * a scalar function, called the - * {@link org.apache.commons.math3.optim.nonlinear.scalar.ObjectiveFunction objective - * function}. + * Generally, optimizers are algorithms that will either + * {@link org.apache.commons.math3.optim.nonlinear.scalar.GoalType#MINIMIZE minimize} or + * {@link org.apache.commons.math3.optim.nonlinear.scalar.GoalType#MAXIMIZE maximize} + * a scalar function, called the + * {@link org.apache.commons.math3.optim.nonlinear.scalar.ObjectiveFunction objective + * function}. + *
      + * For some scalar objective functions the gradient can be computed (analytically + * or numerically). Algorithms that use this knowledge are defined in the + * {@link org.apache.commons.math3.optim.nonlinear.scalar.gradient} package. + * The algorithms that do not need this additional information are located in + * the {@link org.apache.commons.math3.optim.nonlinear.scalar.noderiv} package. + *

      + * *

      - * For some scalar objective functions the gradient can be computed (analytically - * or numerically). Algorithms that use this knowledge are defined in the - * {@link org.apache.commons.math3.optim.nonlinear.scalar.gradient} package. - * The algorithms that do not need this additional information are located in - * the {@link org.apache.commons.math3.optim.nonlinear.scalar.noderiv} package. + * Some problems are solved more efficiently by algorithms that, instead of an + * objective function, need access to a + * {@link org.apache.commons.math3.optim.nonlinear.vector.ModelFunction + * model function}: such a model predicts a set of values which the + * algorithm tries to match with a set of given + * {@link org.apache.commons.math3.optim.nonlinear.vector.Target target values}. + * Those algorithms are located in the + * {@link org.apache.commons.math3.optim.nonlinear.vector} package. + *
      + * Algorithms that also require the + * {@link org.apache.commons.math3.optim.nonlinear.vector.ModelFunctionJacobian + * Jacobian matrix of the model} are located in the + * {@link org.apache.commons.math3.optim.nonlinear.vector.jacobian} package. + *
      + * The {@link org.apache.commons.math3.optim.nonlinear.vector.jacobian.AbstractLeastSquaresOptimizer + * non-linear least-squares optimizers} are a specialization of the the latter, + * that minimize the distance (called cost or χ2) + * between model and observations. + *
      + * For cases where the Jacobian cannot be provided, a utility class will + * {@link org.apache.commons.math3.optim.nonlinear.scalar.LeastSquaresConverter + * convert} a (vector) model into a (scalar) objective function. + *

      + * *

      - * Some problems are solved more efficiently by algorithms that, instead of an - * objective function, need access to a - * {@link org.apache.commons.math3.optim.nonlinear.vector.ModelFunction - * model function}: such a model predicts a set of values which the - * algorithm tries to match with a set of given - * {@link org.apache.commons.math3.optim.nonlinear.vector.Target target values}. - * Those algorithms are located in the - * {@link org.apache.commons.math3.optim.nonlinear.vector} package. + * This package provides common functionality for the optimization algorithms. + * Abstract classes ({@link org.apache.commons.math3.optim.BaseOptimizer} and + * {@link org.apache.commons.math3.optim.BaseMultivariateOptimizer}) contain + * boiler-plate code for storing {@link org.apache.commons.math3.optim.MaxEval + * evaluations} and {@link org.apache.commons.math3.optim.MaxIter iterations} + * counters and a user-defined + * {@link org.apache.commons.math3.optim.ConvergenceChecker convergence checker}. + *

      + * *

      - * Algorithms that also require the - * {@link org.apache.commons.math3.optim.nonlinear.vector.ModelFunctionJacobian - * Jacobian matrix of the model} are located in the - * {@link org.apache.commons.math3.optim.nonlinear.vector.jacobian} package. - *

      - * The {@link org.apache.commons.math3.optim.nonlinear.vector.jacobian.AbstractLeastSquaresOptimizer - * non-linear least-squares optimizers} are a specialization of the the latter, - * that minimize the distance (called cost or χ2) - * between model and observations. - *

      - * For cases where the Jacobian cannot be provided, a utility class will - * {@link org.apache.commons.math3.optim.nonlinear.scalar.LeastSquaresConverter - * convert} a (vector) model into a (scalar) objective function. - *

      - * This package provides common functionality for the optimization algorithms. - * Abstract classes ({@link org.apache.commons.math3.optim.BaseOptimizer} and - * {@link org.apache.commons.math3.optim.BaseMultivariateOptimizer}) contain - * boiler-plate code for storing {@link org.apache.commons.math3.optim.MaxEval - * evaluations} and {@link org.apache.commons.math3.optim.MaxIter iterations} - * counters and a user-defined - * {@link org.apache.commons.math3.optim.ConvergenceChecker convergence checker}. - *

      - * For each of the optimizer types, there is a special implementation that - * wraps an optimizer instance and provides a "multi-start" feature: it calls - * the underlying optimizer several times with different starting points and - * returns the best optimum found, or all optima if so desired. - * This could be useful to avoid being trapped in a local extremum. + * For each of the optimizer types, there is a special implementation that + * wraps an optimizer instance and provides a "multi-start" feature: it calls + * the underlying optimizer several times with different starting points and + * returns the best optimum found, or all optima if so desired. + * This could be useful to avoid being trapped in a local extremum. + *

      */ package org.apache.commons.math3.optim; diff --git a/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateMultiStartOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateMultiStartOptimizer.java index f39363784..1f8a8727c 100644 --- a/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateMultiStartOptimizer.java +++ b/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateMultiStartOptimizer.java @@ -94,7 +94,7 @@ public class BaseMultivariateMultiStartOptimizer + *
      * The returned array as one element for each start as specified * in the constructor. It is ordered with the results from the * runs that did converge first, sorted from best to worst diff --git a/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateVectorMultiStartOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateVectorMultiStartOptimizer.java index efca7c461..7b9b11584 100644 --- a/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateVectorMultiStartOptimizer.java +++ b/src/main/java/org/apache/commons/math3/optimization/BaseMultivariateVectorMultiStartOptimizer.java @@ -94,7 +94,7 @@ public class BaseMultivariateVectorMultiStartOptimizer + *
      * The returned array as one element for each start as specified * in the constructor. It is ordered with the results from the * runs that did converge first, sorted from best to worst diff --git a/src/main/java/org/apache/commons/math3/optimization/ConvergenceChecker.java b/src/main/java/org/apache/commons/math3/optimization/ConvergenceChecker.java index 4bbf9186d..33b09ecb8 100644 --- a/src/main/java/org/apache/commons/math3/optimization/ConvergenceChecker.java +++ b/src/main/java/org/apache/commons/math3/optimization/ConvergenceChecker.java @@ -20,11 +20,11 @@ package org.apache.commons.math3.optimization; /** * This interface specifies how to check if an optimization algorithm has * converged. - *

      + *
      * Deciding if convergence has been reached is a problem-dependent issue. The * user should provide a class implementing this interface to allow the * optimization algorithm to stop its search according to the problem at hand. - *

      + *
      * For convenience, three implementations that fit simple needs are already * provided: {@link SimpleValueChecker}, {@link SimpleVectorValueChecker} and * {@link SimplePointChecker}. The first two consider that convergence is diff --git a/src/main/java/org/apache/commons/math3/optimization/InitialGuess.java b/src/main/java/org/apache/commons/math3/optimization/InitialGuess.java index 510e4f2ff..2eb3a0270 100644 --- a/src/main/java/org/apache/commons/math3/optimization/InitialGuess.java +++ b/src/main/java/org/apache/commons/math3/optimization/InitialGuess.java @@ -19,7 +19,7 @@ package org.apache.commons.math3.optimization; /** * Starting point (first guess) of the optimization procedure. - *

      + *
      * Immutable class. * * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/optimization/LeastSquaresConverter.java b/src/main/java/org/apache/commons/math3/optimization/LeastSquaresConverter.java index e215790d3..cb19f6c9e 100644 --- a/src/main/java/org/apache/commons/math3/optimization/LeastSquaresConverter.java +++ b/src/main/java/org/apache/commons/math3/optimization/LeastSquaresConverter.java @@ -85,10 +85,9 @@ public class LeastSquaresConverter implements MultivariateFunction { *

      * The scalar objective function value is computed as: *

      -     * 
            * objective = ∑weighti(observationi-objectivei)2
      -     * 
            * 
      + *

      *

      * Weights can be used for example to combine residuals with different standard * deviations. As an example, consider a residuals array in which even elements @@ -97,11 +96,12 @@ public class LeastSquaresConverter implements MultivariateFunction { * In this case, the weights array should be initialized with value * 1.0/(0.012) in the even elements and 1.0/(15.02) in the * odd elements (i.e. reciprocals of variances). + *

      *

      * The array computed by the objective function, the observations array and the * weights array must have consistent sizes or a {@link DimensionMismatchException} * will be triggered while computing the scalar objective. - * + *

      * @param function vectorial residuals function to wrap * @param observations observations to be compared to objective function to compute residuals * @param weights weights to apply to the residuals @@ -124,15 +124,14 @@ public class LeastSquaresConverter implements MultivariateFunction { *

      * The scalar objective function value is computed as: *

      -     * 
            * objective = yTy with y = scale×(observation-objective)
      -     * 
            * 
      + *

      *

      * The array computed by the objective function, the observations array and the * the scaling matrix must have consistent sizes or a {@link DimensionMismatchException} * will be triggered while computing the scalar objective. - * + *

      * @param function vectorial residuals function to wrap * @param observations observations to be compared to objective function to compute residuals * @param scale scaling matrix diff --git a/src/main/java/org/apache/commons/math3/optimization/SimpleBounds.java b/src/main/java/org/apache/commons/math3/optimization/SimpleBounds.java index 1456d4107..eb9dc81af 100644 --- a/src/main/java/org/apache/commons/math3/optimization/SimpleBounds.java +++ b/src/main/java/org/apache/commons/math3/optimization/SimpleBounds.java @@ -21,7 +21,7 @@ package org.apache.commons.math3.optimization; * Simple optimization constraints: lower and upper bounds. * The valid range of the parameters is an interval that can be infinite * (in one or both directions). - *

      + *
      * Immutable class. * * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/optimization/SimplePointChecker.java b/src/main/java/org/apache/commons/math3/optimization/SimplePointChecker.java index 0ae0e98cd..6b3af7075 100644 --- a/src/main/java/org/apache/commons/math3/optimization/SimplePointChecker.java +++ b/src/main/java/org/apache/commons/math3/optimization/SimplePointChecker.java @@ -29,7 +29,7 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; * difference between each point coordinate are smaller than a threshold * or if either the absolute difference between the point coordinates are * smaller than another threshold. - *

      + *
      * The {@link #converged(int,Pair,Pair) converged} method will also return * {@code true} if the number of iterations has been set (see * {@link #SimplePointChecker(double,double,int) this constructor}). diff --git a/src/main/java/org/apache/commons/math3/optimization/SimpleValueChecker.java b/src/main/java/org/apache/commons/math3/optimization/SimpleValueChecker.java index 0c2cf76db..ecef7a756 100644 --- a/src/main/java/org/apache/commons/math3/optimization/SimpleValueChecker.java +++ b/src/main/java/org/apache/commons/math3/optimization/SimpleValueChecker.java @@ -28,7 +28,7 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; * difference between the objective function values is smaller than a * threshold or if either the absolute difference between the objective * function values is smaller than another threshold. - *

      + *
      * The {@link #converged(int,PointValuePair,PointValuePair) converged} * method will also return {@code true} if the number of iterations has been set * (see {@link #SimpleValueChecker(double,double,int) this constructor}). diff --git a/src/main/java/org/apache/commons/math3/optimization/SimpleVectorValueChecker.java b/src/main/java/org/apache/commons/math3/optimization/SimpleVectorValueChecker.java index cb0ef232f..6633c8472 100644 --- a/src/main/java/org/apache/commons/math3/optimization/SimpleVectorValueChecker.java +++ b/src/main/java/org/apache/commons/math3/optimization/SimpleVectorValueChecker.java @@ -28,7 +28,7 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; * difference between the objective function values is smaller than a * threshold or if either the absolute difference between the objective * function values is smaller than another threshold for all vectors elements. - *

      + *
      * The {@link #converged(int,PointVectorValuePair,PointVectorValuePair) converged} * method will also return {@code true} if the number of iterations has been set * (see {@link #SimpleVectorValueChecker(double,double,int) this constructor}). diff --git a/src/main/java/org/apache/commons/math3/optimization/Target.java b/src/main/java/org/apache/commons/math3/optimization/Target.java index 68cfacc4f..27a1bed46 100644 --- a/src/main/java/org/apache/commons/math3/optimization/Target.java +++ b/src/main/java/org/apache/commons/math3/optimization/Target.java @@ -21,7 +21,7 @@ package org.apache.commons.math3.optimization; * Target of the optimization procedure. * They are the values which the objective vector function must reproduce * When the parameters of the model have been optimized. - *

      + *
      * Immutable class. * * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/optimization/Weight.java b/src/main/java/org/apache/commons/math3/optimization/Weight.java index 1371d0ce2..28c161903 100644 --- a/src/main/java/org/apache/commons/math3/optimization/Weight.java +++ b/src/main/java/org/apache/commons/math3/optimization/Weight.java @@ -23,7 +23,7 @@ import org.apache.commons.math3.linear.NonSquareMatrixException; /** * Weight matrix of the residuals between model and observations. - *

      + *
      * Immutable class. * * @version $Id$ diff --git a/src/main/java/org/apache/commons/math3/optimization/fitting/CurveFitter.java b/src/main/java/org/apache/commons/math3/optimization/fitting/CurveFitter.java index 92d9a5598..f497da982 100644 --- a/src/main/java/org/apache/commons/math3/optimization/fitting/CurveFitter.java +++ b/src/main/java/org/apache/commons/math3/optimization/fitting/CurveFitter.java @@ -30,7 +30,7 @@ import org.apache.commons.math3.optimization.MultivariateDifferentiableVectorOpt import org.apache.commons.math3.optimization.PointVectorValuePair; /** Fitter for parametric univariate real functions y = f(x). - *

      + *
      * When a univariate real function y = f(x) does depend on some * unknown parameters p0, p1 ... pn-1, * this class can be used to find these parameters. It does this diff --git a/src/main/java/org/apache/commons/math3/optimization/fitting/HarmonicFitter.java b/src/main/java/org/apache/commons/math3/optimization/fitting/HarmonicFitter.java index b37dd43eb..1d59d19bc 100644 --- a/src/main/java/org/apache/commons/math3/optimization/fitting/HarmonicFitter.java +++ b/src/main/java/org/apache/commons/math3/optimization/fitting/HarmonicFitter.java @@ -17,17 +17,17 @@ package org.apache.commons.math3.optimization.fitting; -import org.apache.commons.math3.analysis.function.HarmonicOscillator; -import org.apache.commons.math3.exception.MathIllegalStateException; -import org.apache.commons.math3.exception.NumberIsTooSmallException; -import org.apache.commons.math3.exception.ZeroException; -import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.optimization.DifferentiableMultivariateVectorOptimizer; +import org.apache.commons.math3.analysis.function.HarmonicOscillator; +import org.apache.commons.math3.exception.ZeroException; +import org.apache.commons.math3.exception.NumberIsTooSmallException; +import org.apache.commons.math3.exception.MathIllegalStateException; +import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.util.FastMath; /** * Class that implements a curve fitting specialized for sinusoids. - *

      + * * Harmonic fitting is a very simple case of curve fitting. The * estimated coefficients are the amplitude a, the pulsation ω and * the phase φ: f (t) = a cos (ω t + φ). They are diff --git a/src/main/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizer.java index dc9826042..fddf51a8c 100644 --- a/src/main/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizer.java +++ b/src/main/java/org/apache/commons/math3/optimization/general/AbstractLeastSquaresOptimizer.java @@ -25,19 +25,19 @@ import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.exception.NumberIsTooSmallException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.linear.ArrayRealVector; -import org.apache.commons.math3.linear.DecompositionSolver; +import org.apache.commons.math3.linear.RealMatrix; import org.apache.commons.math3.linear.DiagonalMatrix; -import org.apache.commons.math3.linear.EigenDecomposition; +import org.apache.commons.math3.linear.DecompositionSolver; import org.apache.commons.math3.linear.MatrixUtils; import org.apache.commons.math3.linear.QRDecomposition; -import org.apache.commons.math3.linear.RealMatrix; -import org.apache.commons.math3.optimization.ConvergenceChecker; -import org.apache.commons.math3.optimization.DifferentiableMultivariateVectorOptimizer; -import org.apache.commons.math3.optimization.InitialGuess; +import org.apache.commons.math3.linear.EigenDecomposition; import org.apache.commons.math3.optimization.OptimizationData; -import org.apache.commons.math3.optimization.PointVectorValuePair; +import org.apache.commons.math3.optimization.InitialGuess; import org.apache.commons.math3.optimization.Target; import org.apache.commons.math3.optimization.Weight; +import org.apache.commons.math3.optimization.ConvergenceChecker; +import org.apache.commons.math3.optimization.DifferentiableMultivariateVectorOptimizer; +import org.apache.commons.math3.optimization.PointVectorValuePair; import org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateVectorOptimizer; import org.apache.commons.math3.util.FastMath; @@ -45,7 +45,7 @@ import org.apache.commons.math3.util.FastMath; * Base class for implementing least squares optimizers. * It handles the boilerplate methods associated to thresholds settings, * Jacobian and error estimation. - *

      + *
      * This class constructs the Jacobian matrix of the function argument in method * {@link BaseAbstractMultivariateVectorOptimizer#optimize(int, * org.apache.commons.math3.analysis.MultivariateVectorFunction,OptimizationData[]) @@ -288,7 +288,7 @@ public abstract class AbstractLeastSquaresOptimizer /** * Get the covariance matrix of the optimized parameters. - *

      + *
      * Note that this operation involves the inversion of the * JTJ matrix, where {@code J} is the * Jacobian matrix. @@ -310,7 +310,7 @@ public abstract class AbstractLeastSquaresOptimizer /** * Get the covariance matrix of the optimized parameters. - *

      + *
      * Note that this operation involves the inversion of the * JTJ matrix, where {@code J} is the * Jacobian matrix. diff --git a/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java index c99a82c5d..d12e26fa7 100644 --- a/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java +++ b/src/main/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java @@ -20,11 +20,11 @@ import java.util.Arrays; import org.apache.commons.math3.exception.ConvergenceException; import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.linear.RealMatrix; -import org.apache.commons.math3.optimization.ConvergenceChecker; import org.apache.commons.math3.optimization.PointVectorValuePair; -import org.apache.commons.math3.util.FastMath; +import org.apache.commons.math3.optimization.ConvergenceChecker; +import org.apache.commons.math3.linear.RealMatrix; import org.apache.commons.math3.util.Precision; +import org.apache.commons.math3.util.FastMath; /** @@ -52,9 +52,9 @@ import org.apache.commons.math3.util.Precision; *

    * The redistribution policy for MINPACK is available here, for convenience, it - * is reproduced below. + * is reproduced below.

    * - * + *
    * + *
      *
    * Minpack Copyright Notice (1999) University of Chicago. * All rights reserved @@ -99,7 +99,7 @@ import org.apache.commons.math3.util.Precision; * (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, * EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE * POSSIBILITY OF SUCH LOSS OR DAMAGES. - *
    * @version $Id$ * @deprecated As of 3.1 (to be removed in 4.0). diff --git a/src/main/java/org/apache/commons/math3/optimization/package-info.java b/src/main/java/org/apache/commons/math3/optimization/package-info.java index 98c9ed8bb..84349b25b 100644 --- a/src/main/java/org/apache/commons/math3/optimization/package-info.java +++ b/src/main/java/org/apache/commons/math3/optimization/package-info.java @@ -16,11 +16,12 @@ */ /** *

    All classes and sub-packages of this package are deprecated.

    - *

    Please use their replacements, to be found under:

    + *

    Please use their replacements, to be found under *
      *
    • {@link org.apache.commons.math3.optim}
    • *
    • {@link org.apache.commons.math3.fitting}
    • *
    + *

    * *

    * This package provides common interfaces for the optimization algorithms @@ -53,6 +54,7 @@ * org.apache.commons.math3.analysis.differentiation.MultivariateDifferentiableVectorFunction * multivariate differentiable vectorial functions} *

+ *

* *

* Despite there are only four types of supported optimizers, it is possible to optimize a diff --git a/src/main/java/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java index 6a358d070..20d0980e1 100644 --- a/src/main/java/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java +++ b/src/main/java/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java @@ -16,12 +16,12 @@ */ package org.apache.commons.math3.optimization.univariate; -import org.apache.commons.math3.exception.NotStrictlyPositiveException; +import org.apache.commons.math3.util.Precision; +import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.exception.NumberIsTooSmallException; +import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.optimization.ConvergenceChecker; import org.apache.commons.math3.optimization.GoalType; -import org.apache.commons.math3.util.FastMath; -import org.apache.commons.math3.util.Precision; /** * For a function defined on some interval {@code (lo, hi)}, this class @@ -30,7 +30,7 @@ import org.apache.commons.math3.util.Precision; * It implements Richard Brent's algorithm (from his book "Algorithms for * Minimization without Derivatives", p. 79) for finding minima of real * univariate functions. - *

+ *
* This code is an adaptation, partly based on the Python code from SciPy * (module "optimize.py" v0.5); the original algorithm is also modified *

    diff --git a/src/main/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueChecker.java b/src/main/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueChecker.java index 656996422..6e0b2a448 100644 --- a/src/main/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueChecker.java +++ b/src/main/java/org/apache/commons/math3/optimization/univariate/SimpleUnivariateValueChecker.java @@ -17,9 +17,9 @@ package org.apache.commons.math3.optimization.univariate; +import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.optimization.AbstractConvergenceChecker; -import org.apache.commons.math3.util.FastMath; /** * Simple implementation of the @@ -30,7 +30,7 @@ import org.apache.commons.math3.util.FastMath; * difference between the objective function values is smaller than a * threshold or if either the absolute difference between the objective * function values is smaller than another threshold. - *

    + *
    * The {@link #converged(int,UnivariatePointValuePair,UnivariatePointValuePair) * converged} method will also return {@code true} if the number of iterations * has been set (see {@link #SimpleUnivariateValueChecker(double,double,int) diff --git a/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java index 2231fe46d..5cbf47a14 100644 --- a/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java +++ b/src/main/java/org/apache/commons/math3/optimization/univariate/UnivariateMultiStartOptimizer.java @@ -25,14 +25,14 @@ import org.apache.commons.math3.exception.MathIllegalStateException; import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.exception.NullArgumentException; import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.optimization.ConvergenceChecker; -import org.apache.commons.math3.optimization.GoalType; import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.optimization.GoalType; +import org.apache.commons.math3.optimization.ConvergenceChecker; /** * Special implementation of the {@link UnivariateOptimizer} interface * adding multi-start features to an existing optimizer. - *

    + * * This class wraps a classical optimizer to use it several times in * turn with different starting points in order to avoid being trapped * into a local extremum when looking for a global one. @@ -113,7 +113,7 @@ public class UnivariateMultiStartOptimizer * found at the end of each starts, including the best one already * returned by the {@link #optimize(int,UnivariateFunction,GoalType,double,double) optimize} * method. - *

    + *
    * The returned array as one element for each start as specified * in the constructor. It is ordered with the results from the * runs that did converge first, sorted from best to worst diff --git a/src/main/java/org/apache/commons/math3/util/ArithmeticUtils.java b/src/main/java/org/apache/commons/math3/util/ArithmeticUtils.java index cdc231936..28b265ca3 100644 --- a/src/main/java/org/apache/commons/math3/util/ArithmeticUtils.java +++ b/src/main/java/org/apache/commons/math3/util/ArithmeticUtils.java @@ -85,7 +85,7 @@ public final class ArithmeticUtils { * {@code < Long.MAX_VALUE} is 66. If the computed value exceeds * {@code Long.MAX_VALUE} an {@code ArithMeticException} is * thrown. - *

+ *

* * @param n the size of the set * @param k the size of the subsets to be counted @@ -114,10 +114,10 @@ public final class ArithmeticUtils { *
  • {@code 0 <= k <= n } (otherwise * {@code IllegalArgumentException} is thrown)
  • *
  • The result is small enough to fit into a {@code double}. The - * largest value of {@code n} for which all coefficients are < + * largest value of {@code n} for which all coefficients are < * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE, * Double.POSITIVE_INFINITY is returned
  • - * + *

    * * @param n the size of the set * @param k the size of the subsets to be counted @@ -145,7 +145,7 @@ public final class ArithmeticUtils { *
      *
    • {@code 0 <= k <= n } (otherwise * {@code IllegalArgumentException} is thrown)
    • - *
    + *

    * * @param n the size of the set * @param k the size of the subsets to be counted @@ -172,10 +172,11 @@ public final class ArithmeticUtils { *
  • {@code n >= 0} (otherwise * {@code IllegalArgumentException} is thrown)
  • *
  • The result is small enough to fit into a {@code long}. The - * largest value of {@code n} for which {@code n!} < + * largest value of {@code n} for which {@code n!} < * Long.MAX_VALUE} is 20. If the computed value exceeds {@code Long.MAX_VALUE} * an {@code ArithMeticException } is thrown.
  • * + *

    * * @param n argument * @return {@code n!} @@ -228,7 +229,7 @@ public final class ArithmeticUtils { * numbers, using a modified version of the "binary gcd" method. * See Knuth 4.5.2 algorithm B. * The algorithm is due to Josef Stein (1961). - *

    + *
    * Special cases: *

      *
    • The invocations @@ -315,7 +316,7 @@ public final class ArithmeticUtils { * and modulo operations. * See Knuth 4.5.2 algorithm B. * The algorithm is due to Josef Stein (1961). - *

      + *
      * Special cases: *

        *
      • The result of {@code gcd(x, x)}, {@code gcd(0, x)} and diff --git a/src/main/java/org/apache/commons/math3/util/Combinations.java b/src/main/java/org/apache/commons/math3/util/Combinations.java index 23e5871aa..be758f020 100644 --- a/src/main/java/org/apache/commons/math3/util/Combinations.java +++ b/src/main/java/org/apache/commons/math3/util/Combinations.java @@ -16,14 +16,13 @@ */ package org.apache.commons.math3.util; -import java.io.Serializable; -import java.util.Arrays; -import java.util.Comparator; import java.util.Iterator; +import java.util.Comparator; +import java.util.Arrays; import java.util.NoSuchElementException; - -import org.apache.commons.math3.exception.DimensionMismatchException; +import java.io.Serializable; import org.apache.commons.math3.exception.MathInternalError; +import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.exception.OutOfRangeException; /** @@ -62,7 +61,8 @@ public class Combinations implements Iterable { * For example, {@code new Combinations(4, 2).iterator()} returns * an iterator that will generate the following sequence of arrays * on successive calls to - * {@code next()}: {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} + * {@code next()}:
        + * {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} *

        * If {@code k == 0} an iterator containing an empty array is returned; * if {@code k == n} an iterator containing [0, ..., n - 1] is returned. @@ -89,7 +89,8 @@ public class Combinations implements Iterable { * For example, {@code new Combinations(4, 2).iterator()} returns * an iterator that will generate the following sequence of arrays * on successive calls to - * {@code next()}: {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} + * {@code next()}:
        + * {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} *

        * If {@code k == 0} an iterator containing an empty array is returned; * if {@code k == n} an iterator containing [0, ..., n - 1] is returned. diff --git a/src/main/java/org/apache/commons/math3/util/CombinatoricsUtils.java b/src/main/java/org/apache/commons/math3/util/CombinatoricsUtils.java index c99684b89..fa2480dca 100644 --- a/src/main/java/org/apache/commons/math3/util/CombinatoricsUtils.java +++ b/src/main/java/org/apache/commons/math3/util/CombinatoricsUtils.java @@ -67,7 +67,7 @@ public final class CombinatoricsUtils { * {@code < Long.MAX_VALUE} is 66. If the computed value exceeds * {@code Long.MAX_VALUE} an {@code ArithMeticException} is * thrown.
      • - *
      + *

    * * @param n the size of the set * @param k the size of the subsets to be counted @@ -145,10 +145,10 @@ public final class CombinatoricsUtils { *
  • {@code 0 <= k <= n } (otherwise * {@code IllegalArgumentException} is thrown)
  • *
  • The result is small enough to fit into a {@code double}. The - * largest value of {@code n} for which all coefficients are < + * largest value of {@code n} for which all coefficients are < * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE, * Double.POSITIVE_INFINITY is returned
  • - * + *

    * * @param n the size of the set * @param k the size of the subsets to be counted @@ -193,7 +193,7 @@ public final class CombinatoricsUtils { *
      *
    • {@code 0 <= k <= n } (otherwise * {@code IllegalArgumentException} is thrown)
    • - *
    + *

    * * @param n the size of the set * @param k the size of the subsets to be counted @@ -261,10 +261,11 @@ public final class CombinatoricsUtils { *
  • {@code n >= 0} (otherwise * {@code IllegalArgumentException} is thrown)
  • *
  • The result is small enough to fit into a {@code long}. The - * largest value of {@code n} for which {@code n!} < + * largest value of {@code n} for which {@code n!} < * Long.MAX_VALUE} is 20. If the computed value exceeds {@code Long.MAX_VALUE} * an {@code ArithMeticException } is thrown.
  • * + *

    * * @param n argument * @return {@code n!} @@ -340,7 +341,7 @@ public final class CombinatoricsUtils { *

    * The preconditions are {@code 0 <= k <= n } (otherwise * {@code NotPositiveException} is thrown) - * + *

    * @param n the size of the set * @param k the number of non-empty subsets * @return {@code S(n,k)} @@ -425,7 +426,8 @@ public final class CombinatoricsUtils { * they are visited in lexicographic order with significance from right to * left. For example, combinationsIterator(4, 2) returns an Iterator that * will generate the following sequence of arrays on successive calls to - * {@code next()}: {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} + * {@code next()}:
    + * {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} *

    * If {@code k == 0} an Iterator containing an empty array is returned and * if {@code k == n} an Iterator containing [0, ..., n -1] is returned. diff --git a/src/main/java/org/apache/commons/math3/util/ContinuedFraction.java b/src/main/java/org/apache/commons/math3/util/ContinuedFraction.java index bf803db8c..538467c1a 100644 --- a/src/main/java/org/apache/commons/math3/util/ContinuedFraction.java +++ b/src/main/java/org/apache/commons/math3/util/ContinuedFraction.java @@ -23,12 +23,14 @@ import org.apache.commons.math3.exception.util.LocalizedFormats; /** * Provides a generic means to evaluate continued fractions. Subclasses simply * provided the a and b coefficients to evaluate the continued fraction. + * *

    * References: *

    + *

    * * @version $Id$ */ @@ -109,6 +111,7 @@ public abstract class ContinuedFraction { * * Note: the implementation uses the terms ai and bi as defined in * Continued Fraction @ MathWorld. + *

    * * @param x the evaluation point. * @param epsilon maximum error allowed. diff --git a/src/main/java/org/apache/commons/math3/util/FastMath.java b/src/main/java/org/apache/commons/math3/util/FastMath.java index 712a6cc21..c24e7d14a 100644 --- a/src/main/java/org/apache/commons/math3/util/FastMath.java +++ b/src/main/java/org/apache/commons/math3/util/FastMath.java @@ -27,11 +27,13 @@ import java.io.PrintStream; * {@code Math.cbrt(y)}), user can directly change the class and use the * methods as is (using {@code FastMath.sin(x)} or {@code FastMath.cbrt(y)} * in the previous example). + *

    *

    * FastMath speed is achieved by relying heavily on optimizing compilers * to native code present in many JVMs today and use of large tables. * The larger tables are lazily initialised on first use, so that the setup * time does not penalise methods that don't need them. + *

    *

    * Note that FastMath is * extensively used inside Apache Commons Math, so by calling some algorithms, @@ -40,6 +42,7 @@ import java.io.PrintStream; * Performance figures for a specific JVM and hardware can be evaluated by * running the FastMathTestPerformance tests in the test directory of the source * distribution. + *

    *

    * FastMath accuracy should be mostly independent of the JVM as it relies only * on IEEE-754 basic operations and on embedded tables. Almost all operations @@ -48,6 +51,7 @@ import java.io.PrintStream; * guarantee for every double numbers input (see William Kahan's Table * Maker's Dilemma). + *

    *

    * FastMath additionally implements the following methods not found in Math/StrictMath: *

      @@ -69,7 +73,7 @@ import java.io.PrintStream; *
    • {@link #nextUp(float)}
    • *
    • {@link #scalb(float, int)}
    • *
    - * + *

    * @version $Id$ * @since 2.2 */ @@ -3233,7 +3237,7 @@ public class FastMath { *
  • +MIN_VALUE
  • *
  • +MAX_VALUE
  • *
  • +INFINITY
  • - * + *
  • *

    * If arguments compare equal, then the second argument is returned. *

    @@ -3289,7 +3293,7 @@ public class FastMath { *

  • +MIN_VALUE
  • *
  • +MAX_VALUE
  • *
  • +INFINITY
  • - * + *
  • *

    * If arguments compare equal, then the second argument is returned. *

    @@ -3333,7 +3337,7 @@ public class FastMath { /** Get the largest whole number smaller than x. * @param x number from which floor is requested - * @return a double number f such that f is an integer f ≤ x < f + 1.0 + * @return a double number f such that f is an integer f <= x < f + 1.0 */ public static double floor(double x) { long y; @@ -3360,7 +3364,7 @@ public class FastMath { /** Get the smallest whole number larger than x. * @param x number from which ceil is requested - * @return a double number c such that c is an integer c - 1.0 < x ≤ c + * @return a double number c such that c is an integer c - 1.0 < x <= c */ public static double ceil(double x) { double y; @@ -3385,7 +3389,7 @@ public class FastMath { /** Get the whole number that is the nearest to x, or the even one if x is exactly half way between two integers. * @param x number from which nearest whole number is requested - * @return a double number r such that r is an integer r - 0.5 ≤ x ≤ r + 0.5 + * @return a double number r such that r is an integer r - 0.5 <= x <= r + 0.5 */ public static double rint(double x) { double y = floor(x); @@ -3560,7 +3564,7 @@ public class FastMath { /** * Returns the hypotenuse of a triangle with sides {@code x} and {@code y} - * - sqrt(x2 +y2) + * - sqrt(x2 +y2)
    * avoiding intermediate overflow or underflow. * *

      diff --git a/src/main/java/org/apache/commons/math3/util/MathArrays.java b/src/main/java/org/apache/commons/math3/util/MathArrays.java index 76a149dd1..8391c34e4 100644 --- a/src/main/java/org/apache/commons/math3/util/MathArrays.java +++ b/src/main/java/org/apache/commons/math3/util/MathArrays.java @@ -25,6 +25,8 @@ import java.util.Comparator; import java.util.List; import org.apache.commons.math3.Field; +import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.random.Well19937c; import org.apache.commons.math3.distribution.UniformIntegerDistribution; import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.exception.MathArithmeticException; @@ -37,8 +39,6 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.exception.NullArgumentException; import org.apache.commons.math3.exception.NumberIsTooLargeException; import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.random.RandomGenerator; -import org.apache.commons.math3.random.Well19937c; /** * Arrays utilities. @@ -95,9 +95,9 @@ public class MathArrays { } /** - * Multiply each element of an array by a value. - *

      - * The array is modified in place (no copy is created). + *

      Multiply each element of an array by a value.

      + * + *

      The array is modified in place (no copy is created).

      * * @param arr Array to scale * @param val Scalar @@ -490,7 +490,7 @@ public class MathArrays { } /** - * Check that all entries of the input array are ≥ 0. + * Check that all entries of the input array are >= 0. * * @param in Array to be tested * @throws NotPositiveException if any array entries are less than 0. @@ -506,7 +506,7 @@ public class MathArrays { } /** - * Check all entries of the input array are ≥ 0. + * Check all entries of the input array are >= 0. * * @param in Array to be tested * @throws NotPositiveException if any array entries are less than 0. @@ -526,12 +526,12 @@ public class MathArrays { /** * Returns the Cartesian norm (2-norm), handling both overflow and underflow. * Translation of the minpack enorm subroutine. - *

      + * * The redistribution policy for MINPACK is available * here, for - * convenience, it is reproduced below. - *

      - * + * convenience, it is reproduced below.

      + * + *
      * + *
        *
      * Minpack Copyright Notice (1999) University of Chicago. * All rights reserved @@ -576,7 +576,7 @@ public class MathArrays { * (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, * EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE * POSSIBILITY OF SUCH LOSS OR DAMAGES. - *
      * * @param v Vector of doubles. @@ -804,7 +804,7 @@ public class MathArrays { * ai bi to high accuracy. * It does so by using specific multiplication and addition algorithms to * preserve accuracy and reduce cancellation effects. - *

      + *
      * It is based on the 2005 paper * * Accurate Sum and Dot Product by Takeshi Ogita, Siegfried M. Rump, @@ -1277,7 +1277,7 @@ public class MathArrays { * Normalizes an array to make it sum to a specified value. * Returns the result of the transformation *

      -     *    x |-> x * normalizedSum / sum
      +     *    x |-> x * normalizedSum / sum
            * 
      * applied to each non-NaN element x of the input array, where sum is the * sum of the non-NaN entries in the input array. @@ -1458,7 +1458,7 @@ public class MathArrays { /** * Shuffle the entries of the given array, using the - * + * * Fisher–Yates algorithm. * The {@code start} and {@code pos} parameters select which portion * of the array is randomized and which is left untouched. @@ -1557,8 +1557,9 @@ public class MathArrays { * positive length *
    • throws MathIllegalArgumentException if the array is null or * or the indices are invalid
    • - *
    • returns false if the array is non-null, but length is 0.
    • - *
    + *
  • returns false
  • if the array is non-null, but + * length is 0. + *

    * * @param values the input array * @param begin index of the first array element to include @@ -1581,9 +1582,9 @@ public class MathArrays { * non-negative length *
  • throws IllegalArgumentException if the array is null or * or the indices are invalid
  • - *
  • returns false if the array is non-null, but - * length is 0 unless allowEmpty is true
  • - * + *
  • returns false
  • if the array is non-null, but + * length is 0 unless allowEmpty is true + *

    * * @param values the input array * @param begin index of the first array element to include @@ -1638,9 +1639,9 @@ public class MathArrays { *
  • the weights array contains negative values
  • *
  • the start and length arguments do not determine a valid array
  • * - *
  • returns false if the array is non-null, but - * length is 0.
  • - * + *
  • returns false
  • if the array is non-null, but + * length is 0. + *

    * * @param values the input array * @param weights the weights array @@ -1675,9 +1676,9 @@ public class MathArrays { *
  • the weights array contains negative values
  • *
  • the start and length arguments do not determine a valid array
  • * - *
  • returns false if the array is non-null, but - * length is 0 unless allowEmpty is true.
  • - * + *
  • returns false
  • if the array is non-null, but + * length is 0 unless allowEmpty is true. + *

    * * @param values the input array. * @param weights the weights array. diff --git a/src/main/java/org/apache/commons/math3/util/MathUtils.java b/src/main/java/org/apache/commons/math3/util/MathUtils.java index 8812d19b1..047cd3fe6 100644 --- a/src/main/java/org/apache/commons/math3/util/MathUtils.java +++ b/src/main/java/org/apache/commons/math3/util/MathUtils.java @@ -84,9 +84,9 @@ public final class MathUtils { * Normalize an angle in a 2π wide interval around a center value. *

    This method has three main uses:

    *
      - *
    • normalize an angle between 0 and 2π:
      + *
    • normalize an angle between 0 and 2π:
      * {@code a = MathUtils.normalizeAngle(a, FastMath.PI);}
    • - *
    • normalize an angle between -π and +π
      + *
    • normalize an angle between -π and +π
      * {@code a = MathUtils.normalizeAngle(a, 0.0);}
    • *
    • compute the angle between two defining angular positions:
      * {@code angle = MathUtils.normalizeAngle(end, start) - start;}
    • @@ -104,14 +104,14 @@ public final class MathUtils { } /** - * Reduce {@code |a - offset|} to the primary interval - * {@code [0, |period|)}. - *

      - * Specifically, the value returned is
      - * {@code a - |period| * floor((a - offset) / |period|) - offset}. - *

      - * If any of the parameters are {@code NaN} or infinite, the result is - * {@code NaN}. + *

      Reduce {@code |a - offset|} to the primary interval + * {@code [0, |period|)}.

      + * + *

      Specifically, the value returned is
      + * {@code a - |period| * floor((a - offset) / |period|) - offset}.

      + * + *

      If any of the parameters are {@code NaN} or infinite, the result is + * {@code NaN}.

      * * @param a Value to reduce. * @param period Period. diff --git a/src/main/java/org/apache/commons/math3/util/Pair.java b/src/main/java/org/apache/commons/math3/util/Pair.java index 7d7aeb83c..ee24a8582 100644 --- a/src/main/java/org/apache/commons/math3/util/Pair.java +++ b/src/main/java/org/apache/commons/math3/util/Pair.java @@ -18,7 +18,7 @@ package org.apache.commons.math3.util; /** * Generic pair. - *

      + *
      * Although the instances of this class are immutable, it is impossible * to ensure that the references passed to the constructor will not be * modified by the caller. diff --git a/src/main/java/org/apache/commons/math3/util/Precision.java b/src/main/java/org/apache/commons/math3/util/Precision.java index 0b4db4a05..d08947617 100644 --- a/src/main/java/org/apache/commons/math3/util/Precision.java +++ b/src/main/java/org/apache/commons/math3/util/Precision.java @@ -47,7 +47,7 @@ public class Precision { /** * Safe minimum, such that {@code 1 / SAFE_MIN} does not overflow. - *

      + *
      * In IEEE 754 arithmetic, this is also the smallest normalized * number 2-1022. */ @@ -92,7 +92,7 @@ public class Precision { * @param eps the amount of error to allow when checking for equality * @return

      • 0 if {@link #equals(double, double, double) equals(x, y, eps)}
      • *
      • < 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x < y
      • - *
      • > 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x > y
      + *
    • > 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x > y
    */ 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
    • 0 if {@link #equals(double, double, int) equals(x, y, maxUlps)}
    • *
    • < 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x < y
    • - *
    • > 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x > y
    + *
  • > 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x > y
  • */ public static int compareTo(final double x, final double y, final int maxUlps) { if (equals(x, y, maxUlps)) { diff --git a/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java b/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java index e1a6bf6a8..7de32214d 100644 --- a/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java +++ b/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java @@ -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.NotStrictlyPositiveException; import org.apache.commons.math3.exception.NullArgumentException; +import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.exception.NumberIsTooSmallException; import org.apache.commons.math3.exception.util.LocalizedFormats; @@ -220,6 +220,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { *
  • {@code expansionMode = MULTIPLICATIVE}
  • *
  • {@code contractionCriterion = 0.5 + expansionFactor}
  • * + *
    * Throws IllegalArgumentException if the following conditions are * not met: *
      @@ -250,6 +251,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { *
    • {@code expansionMode = MULTIPLICATIVE}
    • *
    • {@code contractionCriterion = 0.5 + expansionFactor}
    • *
    + *
    * Throws IllegalArgumentException if the following conditions are * not met: *
      @@ -275,7 +277,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { * Creates an instance with the specified initialCapacity, * expansionFactor, and contractionCriterion. * The expansion mode will default to {@code MULTIPLICATIVE}. - *

      + *
      * Throws IllegalArgumentException if the following conditions are * not met: *

        @@ -306,7 +308,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { * Creates an instance with the specified initial capacity, * expansion factor, and contraction criteria. * The expansion mode will default to {@code MULTIPLICATIVE}. - *

        + *
        * Throws IllegalArgumentException if the following conditions are * not met: *

          @@ -316,7 +318,8 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { *
        * * @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 @@ -333,17 +336,18 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { } /** - * Create a ResizableArray with the specified properties. + *

        + * Create a ResizableArray with the specified properties.

        *

        * Throws IllegalArgumentException if the following conditions are * not met: *

          - *
        • initialCapacity > 0
        • - *
        • expansionFactor > 1
        • - *
        • contractionFactor ≥ expansionFactor
        • + *
        • initialCapacity > 0
        • + *
        • expansionFactor > 1
        • + *
        • contractionFactor >= expansionFactor
        • *
        • expansionMode in {MULTIPLICATIVE_MODE, ADDITIVE_MODE} *
        • - *
        + *

      * * @param initialCapacity the initial size of the internal storage array * @param expansionFactor the array will be expanded based on this @@ -372,12 +376,12 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { /** * Creates an instance with the specified properties. - *

      + *
      * Throws MathIllegalArgumentException if the following conditions are * not met: *

        - *
      • {@code initialCapacity > 0}
      • - *
      • {@code expansionFactor > 1}
      • + *
      • {@code initialCapacity > 0}
      • + *
      • {@code expansionFactor > 1}
      • *
      • {@code contractionCriterion >= expansionFactor}
      • *
      * @@ -415,9 +419,9 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { /** * 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. Original may not be null; otherwise a {@link NullArgumentException} + * is thrown. * * @param original array to copy * @exception NullArgumentException if original is null @@ -461,10 +465,12 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { * 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. + *

      *

      * 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. + *

      * * @param value Value to be added to the array. * @return the value which has been discarded or "pushed" out of the array @@ -517,7 +523,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { /** * 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 @@ -580,7 +586,8 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { /** * 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]; @@ -871,15 +878,15 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { * Provides direct access to the internal storage array. * Please note that this method returns a reference to this object's * storage array, not a copy. - *

      + *
      * To correctly address elements of the array, the "start index" is * required (available via the {@link #getStartIndex() getStartIndex} * method. - *

      + *
      * This method should only be used to avoid copying the internal array. * The returned value must be used for reading only; other * uses could lead to this object becoming inconsistent. - *

      + *
      * The {@link #getElements} method has no such limitation since it * returns a copy of this array's addressable elements. * @@ -969,11 +976,11 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { * Sets the expansionFactor. Throws IllegalArgumentException if the * the following conditions are not met: *

        - *
      • expansionFactor > 1
      • - *
      • contractionFactor ≥ expansionFactor
      • + *
      • expansionFactor > 1
      • + *
      • contractionFactor >= expansionFactor
      • *
      * @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"). */ @@ -1095,14 +1102,15 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { } /** - * Copies source to dest, copying the underlying data, so dest is - * a new, independent copy of source. Does not contract before the copy. - *

      - * Obtains synchronization locks on both source and dest - * (in that order) before performing the copy. - *

      - * Neither source nor dest may be null; otherwise a {@link NullArgumentException} - * is thrown. + *

      Copies source to dest, copying the underlying data, so dest is + * a new, independent copy of source. Does not contract before + * the copy.

      + * + *

      Obtains synchronization locks on both source and dest + * (in that order) before performing the copy.

      + * + *

      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 @@ -1130,7 +1138,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { } /** - * 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