diff --git a/src/main/java/org/apache/commons/math4/analysis/integration/IterativeLegendreGaussIntegrator.java b/src/main/java/org/apache/commons/math4/analysis/integration/IterativeLegendreGaussIntegrator.java index eedc41e5a..f65334c9f 100644 --- a/src/main/java/org/apache/commons/math4/analysis/integration/IterativeLegendreGaussIntegrator.java +++ b/src/main/java/org/apache/commons/math4/analysis/integration/IterativeLegendreGaussIntegrator.java @@ -158,6 +158,7 @@ public class IterativeLegendreGaussIntegrator throws TooManyEvaluationsException { // Function to be integrated is stored in the base class. final UnivariateFunction f = new UnivariateFunction() { + /** {@inheritDoc} */ @Override public double value(double x) throws MathIllegalArgumentException, TooManyEvaluationsException { diff --git a/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolator.java b/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolator.java index 4737a9bc2..62d16029b 100644 --- a/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolator.java +++ b/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolator.java @@ -97,6 +97,7 @@ public class BicubicInterpolator // Create the interpolating function. return new BicubicInterpolatingFunction(xval, yval, fval, dFdX, dFdY, d2FdXdY) { + /** {@inheritDoc} */ @Override public boolean isValidPoint(double x, double y) { if (x < xval[1] || diff --git a/src/main/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolator.java b/src/main/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolator.java index e8fc3d19a..bdc7f201b 100644 --- a/src/main/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolator.java +++ b/src/main/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolator.java @@ -125,6 +125,7 @@ public class TricubicInterpolator dFdX, dFdY, dFdZ, d2FdXdY, d2FdXdZ, d2FdYdZ, d3FdXdYdZ) { + /** {@inheritDoc} */ @Override public boolean isValidPoint(double x, double y, double z) { if (x < xval[1] || diff --git a/src/main/java/org/apache/commons/math4/analysis/interpolation/UnivariatePeriodicInterpolator.java b/src/main/java/org/apache/commons/math4/analysis/interpolation/UnivariatePeriodicInterpolator.java index 013739713..5665f8ae9 100644 --- a/src/main/java/org/apache/commons/math4/analysis/interpolation/UnivariatePeriodicInterpolator.java +++ b/src/main/java/org/apache/commons/math4/analysis/interpolation/UnivariatePeriodicInterpolator.java @@ -116,6 +116,7 @@ public class UnivariatePeriodicInterpolator final UnivariateFunction f = interpolator.interpolate(x, y); return new UnivariateFunction() { + /** {@inheritDoc} */ @Override public double value(final double x) throws MathIllegalArgumentException { return f.value(MathUtils.reduce(x, period, offset)); diff --git a/src/main/java/org/apache/commons/math4/analysis/polynomials/PolynomialsUtils.java b/src/main/java/org/apache/commons/math4/analysis/polynomials/PolynomialsUtils.java index a9ff990ae..8574b8656 100644 --- a/src/main/java/org/apache/commons/math4/analysis/polynomials/PolynomialsUtils.java +++ b/src/main/java/org/apache/commons/math4/analysis/polynomials/PolynomialsUtils.java @@ -104,6 +104,7 @@ public class PolynomialsUtils { public static PolynomialFunction createChebyshevPolynomial(final int degree) { return buildPolynomial(degree, CHEBYSHEV_COEFFICIENTS, new RecurrenceCoefficientsGenerator() { + /** Fixed recurrence coefficients. */ private final BigFraction[] coeffs = { BigFraction.ZERO, BigFraction.TWO, BigFraction.ONE }; /** {@inheritDoc} */ @Override diff --git a/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java index b10e41f9c..e43a0fa4b 100644 --- a/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java @@ -163,7 +163,7 @@ implements RealDistribution, Serializable { } final UnivariateFunction toSolve = new UnivariateFunction() { - + /** {@inheritDoc} */ @Override public double value(final double x) { return cumulativeProbability(x) - p; diff --git a/src/main/java/org/apache/commons/math4/distribution/ConstantRealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/ConstantRealDistribution.java index 0f7ab330b..35854a402 100644 --- a/src/main/java/org/apache/commons/math4/distribution/ConstantRealDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/ConstantRealDistribution.java @@ -54,6 +54,7 @@ public class ConstantRealDistribution extends AbstractRealDistribution { return x < value ? 0 : 1; } + /** {@inheritDoc} */ @Override public double inverseCumulativeProbability(final double p) throws OutOfRangeException { diff --git a/src/main/java/org/apache/commons/math4/distribution/GumbelDistribution.java b/src/main/java/org/apache/commons/math4/distribution/GumbelDistribution.java index 04288fcdb..0aa3fb238 100644 --- a/src/main/java/org/apache/commons/math4/distribution/GumbelDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/GumbelDistribution.java @@ -118,6 +118,7 @@ public class GumbelDistribution extends AbstractRealDistribution { return FastMath.exp(-FastMath.exp(-z)); } + /** {@inheritDoc} */ @Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { if (p < 0.0 || p > 1.0) { diff --git a/src/main/java/org/apache/commons/math4/distribution/LaplaceDistribution.java b/src/main/java/org/apache/commons/math4/distribution/LaplaceDistribution.java index c13c26556..7e41a29a7 100644 --- a/src/main/java/org/apache/commons/math4/distribution/LaplaceDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/LaplaceDistribution.java @@ -111,6 +111,7 @@ public class LaplaceDistribution extends AbstractRealDistribution { } } + /** {@inheritDoc} */ @Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { if (p < 0.0 || p > 1.0) { diff --git a/src/main/java/org/apache/commons/math4/distribution/LogisticDistribution.java b/src/main/java/org/apache/commons/math4/distribution/LogisticDistribution.java index 05fb43616..14c2a9887 100644 --- a/src/main/java/org/apache/commons/math4/distribution/LogisticDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/LogisticDistribution.java @@ -112,6 +112,7 @@ public class LogisticDistribution extends AbstractRealDistribution { return 1.0 / (1.0 + FastMath.exp(-z)); } + /** {@inheritDoc} */ @Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { if (p < 0.0 || p > 1.0) { diff --git a/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java b/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java index 7a018c653..fa8b0f5bc 100644 --- a/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java @@ -130,6 +130,7 @@ public class NakagamiDistribution extends AbstractRealDistribution { return omega; } + /** {@inheritDoc} */ @Override protected double getSolverAbsoluteAccuracy() { return inverseAbsoluteAccuracy; diff --git a/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java b/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java index eb6762d05..072f5c571 100644 --- a/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java @@ -259,6 +259,7 @@ public class TriangularDistribution extends AbstractRealDistribution { return true; } + /** {@inheritDoc} */ @Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { diff --git a/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java index e670146a6..5a54a8b2f 100644 --- a/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java @@ -119,6 +119,7 @@ public class UniformRealDistribution extends AbstractRealDistribution { return (x - lower) / (upper - lower); } + /** {@inheritDoc} */ @Override public double inverseCumulativeProbability(final double p) throws OutOfRangeException { diff --git a/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java b/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java index 5e7018c84..7c0d4d8d0 100644 --- a/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java +++ b/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java @@ -271,6 +271,7 @@ public class ZipfDistribution extends AbstractIntegerDistribution { return true; } + /** {@inheritDoc} */ @Override public int sample() { if (sampler == null) { diff --git a/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java index 9cd184d83..06527f5d0 100644 --- a/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java +++ b/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java @@ -134,6 +134,7 @@ public abstract class AbstractCurveFitter { */ public MultivariateMatrixFunction getModelFunctionJacobian() { return new MultivariateMatrixFunction() { + /** {@inheritDoc} */ @Override public double[][] value(double[] p) { final int len = points.length; diff --git a/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java index 10b11f368..ae2b8d8da 100644 --- a/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java +++ b/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java @@ -72,6 +72,7 @@ import org.apache.commons.math4.util.FastMath; public class GaussianCurveFitter extends AbstractCurveFitter { /** Parametric function to be fitted. */ private static final Gaussian.Parametric FUNCTION = new Gaussian.Parametric() { + /** {@inheritDoc} */ @Override public double value(double x, double ... p) { double v = Double.POSITIVE_INFINITY; @@ -83,6 +84,7 @@ public class GaussianCurveFitter extends AbstractCurveFitter { return v; } + /** {@inheritDoc} */ @Override public double[] gradient(double x, double ... p) { double[] v = { Double.POSITIVE_INFINITY, @@ -249,6 +251,7 @@ public class GaussianCurveFitter extends AbstractCurveFitter { final List observations = new ArrayList(unsorted); final Comparator cmp = new Comparator() { + /** {@inheritDoc} */ @Override public int compare(WeightedObservedPoint p1, WeightedObservedPoint p2) { diff --git a/src/main/java/org/apache/commons/math4/fitting/leastsquares/GaussNewtonOptimizer.java b/src/main/java/org/apache/commons/math4/fitting/leastsquares/GaussNewtonOptimizer.java index 747c7922b..ec17b931c 100644 --- a/src/main/java/org/apache/commons/math4/fitting/leastsquares/GaussNewtonOptimizer.java +++ b/src/main/java/org/apache/commons/math4/fitting/leastsquares/GaussNewtonOptimizer.java @@ -248,6 +248,7 @@ public class GaussNewtonOptimizer implements LeastSquaresOptimizer { } } + /** {@inheritDoc} */ @Override public String toString() { return "GaussNewtonOptimizer{" + diff --git a/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java b/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java index 31962479b..a0ddace06 100644 --- a/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java +++ b/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java @@ -192,6 +192,7 @@ public class LeastSquaresFactory { final RealMatrix weights) { final RealMatrix weightSquareRoot = squareRoot(weights); return new LeastSquaresAdapter(problem) { + /** {@inheritDoc} */ @Override public Evaluation evaluate(final RealVector point) { return new DenseWeightedEvaluation(super.evaluate(point), weightSquareRoot); @@ -226,6 +227,7 @@ public class LeastSquaresFactory { final Incrementor counter) { return new LeastSquaresAdapter(problem) { + /** {@inheritDoc} */ @Override public Evaluation evaluate(final RealVector point) { counter.incrementCount(); @@ -245,6 +247,7 @@ public class LeastSquaresFactory { */ public static ConvergenceChecker evaluationChecker(final ConvergenceChecker checker) { return new ConvergenceChecker() { + /** {@inheritDoc} */ @Override public boolean converged(final int iteration, final Evaluation previous, diff --git a/src/main/java/org/apache/commons/math4/genetics/AbstractListChromosome.java b/src/main/java/org/apache/commons/math4/genetics/AbstractListChromosome.java index e470d341d..707ddd504 100644 --- a/src/main/java/org/apache/commons/math4/genetics/AbstractListChromosome.java +++ b/src/main/java/org/apache/commons/math4/genetics/AbstractListChromosome.java @@ -98,6 +98,7 @@ public abstract class AbstractListChromosome extends Chromosome { */ public abstract AbstractListChromosome newFixedLengthChromosome(final List chromosomeRepresentation); + /** {@inheritDoc} */ @Override public String toString() { return String.format("(f=%s %s)", getFitness(), getRepresentation()); diff --git a/src/main/java/org/apache/commons/math4/genetics/BinaryChromosome.java b/src/main/java/org/apache/commons/math4/genetics/BinaryChromosome.java index e1efea913..b4aa23291 100644 --- a/src/main/java/org/apache/commons/math4/genetics/BinaryChromosome.java +++ b/src/main/java/org/apache/commons/math4/genetics/BinaryChromosome.java @@ -74,6 +74,7 @@ public abstract class BinaryChromosome extends AbstractListChromosome { return rList; } + /** {@inheritDoc} */ @Override protected boolean isSame(Chromosome another) { // type check diff --git a/src/main/java/org/apache/commons/math4/genetics/ChromosomePair.java b/src/main/java/org/apache/commons/math4/genetics/ChromosomePair.java index dc7645154..44ff28eee 100644 --- a/src/main/java/org/apache/commons/math4/genetics/ChromosomePair.java +++ b/src/main/java/org/apache/commons/math4/genetics/ChromosomePair.java @@ -58,6 +58,7 @@ public class ChromosomePair { return second; } + /** {@inheritDoc} */ @Override public String toString() { return String.format("(%s,%s)", getFirst(), getSecond()); diff --git a/src/main/java/org/apache/commons/math4/genetics/RandomKey.java b/src/main/java/org/apache/commons/math4/genetics/RandomKey.java index 07bd27c7a..8186a5274 100644 --- a/src/main/java/org/apache/commons/math4/genetics/RandomKey.java +++ b/src/main/java/org/apache/commons/math4/genetics/RandomKey.java @@ -278,6 +278,7 @@ public abstract class RandomKey extends AbstractListChromosome implem return Arrays.asList(res); } + /** {@inheritDoc} */ @Override public String toString() { return String.format("(f=%s pi=(%s))", getFitness(), baseSeqPermutation); diff --git a/src/main/java/org/apache/commons/math4/genetics/TournamentSelection.java b/src/main/java/org/apache/commons/math4/genetics/TournamentSelection.java index 69f2cfaa6..97becff40 100644 --- a/src/main/java/org/apache/commons/math4/genetics/TournamentSelection.java +++ b/src/main/java/org/apache/commons/math4/genetics/TournamentSelection.java @@ -75,6 +75,7 @@ public class TournamentSelection implements SelectionPolicy { } // auxiliary population ListPopulation tournamentPopulation = new ListPopulation(this.arity) { + /** {@inheritDoc} */ @Override public Population nextGeneration() { // not useful here diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java index af0846f48..dd8929646 100644 --- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java +++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java @@ -452,7 +452,6 @@ public class Line implements Hyperplane, Embedding { - // CHECKSTYLE: stop JavadocVariable check /** Transform factor between input abscissa and output abscissa. */ private final double cXX; @@ -471,10 +470,14 @@ public class Line implements Hyperplane, Embedding findHullVertices(final Collection points) { @@ -80,6 +81,7 @@ public class MonotoneChain extends AbstractConvexHullGenerator2D { // sort the points in increasing order on the x-axis Collections.sort(pointsSortedByXAxis, new Comparator() { + /** {@inheritDoc} */ @Override public int compare(final Vector2D o1, final Vector2D o2) { final double tolerance = getTolerance(); diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java index 1df1fcfe3..57d2c648f 100644 --- a/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java +++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java @@ -110,6 +110,7 @@ public abstract class AbstractRegion implement // (we don't want equal size elements to be removed, so // we use a trick to fool the TreeSet) final TreeSet> ordered = new TreeSet>(new Comparator>() { + /** {@inheritDoc} */ @Override public int compare(final SubHyperplane o1, final SubHyperplane o2) { final double size1 = o1.getSize(); diff --git a/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java b/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java index 62aa6e7c2..0e3d0e526 100644 --- a/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java +++ b/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java @@ -45,6 +45,7 @@ public class SumOfClusterVariances extends ClusterEvaluat super(measure); } + /** {@inheritDoc} */ @Override public double score(final List> clusters) { double varianceSum = 0.0; diff --git a/src/main/java/org/apache/commons/math4/ode/events/EventState.java b/src/main/java/org/apache/commons/math4/ode/events/EventState.java index b89b00d78..76ef13d75 100644 --- a/src/main/java/org/apache/commons/math4/ode/events/EventState.java +++ b/src/main/java/org/apache/commons/math4/ode/events/EventState.java @@ -236,6 +236,8 @@ public class EventState { final double h = dt / n; final UnivariateFunction f = new UnivariateFunction() { + /** {@inheritDoc} */ + @Override public double value(final double t) throws LocalMaxCountExceededException { try { interpolator.setInterpolatedTime(t); diff --git a/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java b/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java index 63c0b8327..8e804e888 100644 --- a/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java +++ b/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java @@ -183,6 +183,7 @@ public class LinearConstraint implements Serializable { return value; } + /** {@inheritDoc} */ @Override public boolean equals(Object other) { if (this == other) { @@ -197,6 +198,7 @@ public class LinearConstraint implements Serializable { return false; } + /** {@inheritDoc} */ @Override public int hashCode() { return relationship.hashCode() ^ diff --git a/src/main/java/org/apache/commons/math4/optim/linear/LinearObjectiveFunction.java b/src/main/java/org/apache/commons/math4/optim/linear/LinearObjectiveFunction.java index f47b8ccff..9bf186683 100644 --- a/src/main/java/org/apache/commons/math4/optim/linear/LinearObjectiveFunction.java +++ b/src/main/java/org/apache/commons/math4/optim/linear/LinearObjectiveFunction.java @@ -107,6 +107,7 @@ public class LinearObjectiveFunction return coefficients.dotProduct(point) + constantTerm; } + /** {@inheritDoc} */ @Override public boolean equals(Object other) { if (this == other) { @@ -120,6 +121,7 @@ public class LinearObjectiveFunction return false; } + /** {@inheritDoc} */ @Override public int hashCode() { return Double.valueOf(constantTerm).hashCode() ^ coefficients.hashCode(); diff --git a/src/main/java/org/apache/commons/math4/optim/linear/Relationship.java b/src/main/java/org/apache/commons/math4/optim/linear/Relationship.java index 78223021f..91fc67dc7 100644 --- a/src/main/java/org/apache/commons/math4/optim/linear/Relationship.java +++ b/src/main/java/org/apache/commons/math4/optim/linear/Relationship.java @@ -41,6 +41,7 @@ public enum Relationship { this.stringValue = stringValue; } + /** {@inheritDoc} */ @Override public String toString() { return stringValue; diff --git a/src/main/java/org/apache/commons/math4/optim/linear/SimplexTableau.java b/src/main/java/org/apache/commons/math4/optim/linear/SimplexTableau.java index f11632bc0..7d6c8f003 100644 --- a/src/main/java/org/apache/commons/math4/optim/linear/SimplexTableau.java +++ b/src/main/java/org/apache/commons/math4/optim/linear/SimplexTableau.java @@ -674,6 +674,7 @@ class SimplexTableau implements Serializable { return tableau.getData(); } + /** {@inheritDoc} */ @Override public boolean equals(Object other) { @@ -696,6 +697,7 @@ class SimplexTableau implements Serializable { return false; } + /** {@inheritDoc} */ @Override public int hashCode() { return Boolean.valueOf(restrictToNonNegative).hashCode() ^ diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LineSearch.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LineSearch.java index 558b98a5a..8b8bcc671 100644 --- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LineSearch.java +++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LineSearch.java @@ -112,6 +112,7 @@ public class LineSearch { final double[] direction) { final int n = startPoint.length; final UnivariateFunction f = new UnivariateFunction() { + /** {@inheritDoc} */ @Override public double value(double alpha) { final double[] x = new double[n]; diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultiStartMultivariateOptimizer.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultiStartMultivariateOptimizer.java index 0bfa63f0f..d05986831 100644 --- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultiStartMultivariateOptimizer.java +++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultiStartMultivariateOptimizer.java @@ -94,6 +94,7 @@ public class MultiStartMultivariateOptimizer */ private Comparator getPairComparator() { return new Comparator() { + /** {@inheritDoc} */ @Override public int compare(final PointValuePair o1, final PointValuePair o2) { diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java index e8487b0b0..d7f9fc231 100644 --- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java +++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java @@ -54,18 +54,29 @@ public class BOBYQAOptimizer public static final double DEFAULT_INITIAL_RADIUS = 10.0; /** Default value for {@link #stoppingTrustRegionRadius}: {@value} . */ public static final double DEFAULT_STOPPING_RADIUS = 1E-8; - + /** Constant 0. */ private static final double ZERO = 0d; + /** Constant 1. */ private static final double ONE = 1d; + /** Constant 2. */ private static final double TWO = 2d; + /** Constant 10. */ private static final double TEN = 10d; + /** Constant 16. */ private static final double SIXTEEN = 16d; + /** Constant 250. */ private static final double TWO_HUNDRED_FIFTY = 250d; + /** Constant -1. */ private static final double MINUS_ONE = -ONE; + /** Constant 1/2. */ private static final double HALF = ONE / 2; + /** Constant 1/4. */ private static final double ONE_OVER_FOUR = ONE / 4; + /** Constant 1/8. */ private static final double ONE_OVER_EIGHT = ONE / 8; + /** Constant 1/10. */ private static final double ONE_OVER_TEN = ONE / 10; + /** Constant 1/1000. */ private static final double ONE_OVER_A_THOUSAND = ONE / 1000; /** @@ -2447,8 +2458,10 @@ public class BOBYQAOptimizer * If the path becomes explored, it should just be removed from the code. */ private static class PathIsExploredException extends RuntimeException { + /** Serializable UID. */ private static final long serialVersionUID = 745350979634801853L; + /** Message string. */ private static final String PATH_IS_EXPLORED = "If this exception is thrown, just remove it from the code"; diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java index ad39a05d1..c5bd08bb4 100644 --- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java +++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java @@ -131,6 +131,7 @@ public class SimplexOptimizer extends MultivariateOptimizer { // evaluations counter. final MultivariateFunction evalFunc = new MultivariateFunction() { + /** {@inheritDoc} */ @Override public double value(double[] point) { return computeObjectiveValue(point); @@ -140,6 +141,7 @@ public class SimplexOptimizer extends MultivariateOptimizer { final boolean isMinim = getGoalType() == GoalType.MINIMIZE; final Comparator comparator = new Comparator() { + /** {@inheritDoc} */ @Override public int compare(final PointValuePair o1, final PointValuePair o2) { diff --git a/src/main/java/org/apache/commons/math4/optim/univariate/MultiStartUnivariateOptimizer.java b/src/main/java/org/apache/commons/math4/optim/univariate/MultiStartUnivariateOptimizer.java index c8a59e92b..5383a5268 100644 --- a/src/main/java/org/apache/commons/math4/optim/univariate/MultiStartUnivariateOptimizer.java +++ b/src/main/java/org/apache/commons/math4/optim/univariate/MultiStartUnivariateOptimizer.java @@ -211,6 +211,7 @@ public class MultiStartUnivariateOptimizer */ private void sortPairs(final GoalType goal) { Arrays.sort(optima, new Comparator() { + /** {@inheritDoc} */ @Override public int compare(final UnivariatePointValuePair o1, final UnivariatePointValuePair o2) { diff --git a/src/main/java/org/apache/commons/math4/special/Beta.java b/src/main/java/org/apache/commons/math4/special/Beta.java index c2696e1a4..bfcf818ab 100644 --- a/src/main/java/org/apache/commons/math4/special/Beta.java +++ b/src/main/java/org/apache/commons/math4/special/Beta.java @@ -195,6 +195,7 @@ public class Beta { } else { ContinuedFraction fraction = new ContinuedFraction() { + /** {@inheritDoc} */ @Override protected double getB(int n, double x) { double ret; @@ -211,6 +212,7 @@ public class Beta { return ret; } + /** {@inheritDoc} */ @Override protected double getA(int n, double x) { return 1.0; diff --git a/src/main/java/org/apache/commons/math4/special/Gamma.java b/src/main/java/org/apache/commons/math4/special/Gamma.java index f390f7c2b..70aaec3cb 100644 --- a/src/main/java/org/apache/commons/math4/special/Gamma.java +++ b/src/main/java/org/apache/commons/math4/special/Gamma.java @@ -402,11 +402,13 @@ public class Gamma { // create continued fraction ContinuedFraction cf = new ContinuedFraction() { + /** {@inheritDoc} */ @Override protected double getA(int n, double x) { return ((2.0 * n) + 1.0) - a + x; } + /** {@inheritDoc} */ @Override protected double getB(int n, double x) { return n * (a - n); diff --git a/src/main/java/org/apache/commons/math4/stat/correlation/KendallsCorrelation.java b/src/main/java/org/apache/commons/math4/stat/correlation/KendallsCorrelation.java index 125083e91..8df17eabb 100644 --- a/src/main/java/org/apache/commons/math4/stat/correlation/KendallsCorrelation.java +++ b/src/main/java/org/apache/commons/math4/stat/correlation/KendallsCorrelation.java @@ -168,6 +168,7 @@ public class KendallsCorrelation { } Arrays.sort(pairs, new Comparator>() { + /** {@inheritDoc} */ @Override public int compare(Pair pair1, Pair pair2) { int compareFirst = pair1.getFirst().compareTo(pair2.getFirst()); diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java index 34d8b6065..79bdc5ead 100644 --- a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java +++ b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java @@ -825,6 +825,7 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic return result; } + /** {@inheritDoc} */ @Override public int hashCode() { return Arrays.hashCode(new double[] {markerHeight, intMarkerPosition, diff --git a/src/main/java/org/apache/commons/math4/util/MathArrays.java b/src/main/java/org/apache/commons/math4/util/MathArrays.java index d6195e664..e939fcc92 100644 --- a/src/main/java/org/apache/commons/math4/util/MathArrays.java +++ b/src/main/java/org/apache/commons/math4/util/MathArrays.java @@ -846,12 +846,14 @@ public class MathArrays { final Comparator comp = dir == MathArrays.OrderDirection.INCREASING ? new Comparator() { + /** {@inheritDoc} */ @Override public int compare(PairDoubleInteger o1, PairDoubleInteger o2) { return Double.compare(o1.getKey(), o2.getKey()); } } : new Comparator() { + /** {@inheritDoc} */ @Override public int compare(PairDoubleInteger o1, PairDoubleInteger o2) { diff --git a/src/main/java/org/apache/commons/math4/util/Pair.java b/src/main/java/org/apache/commons/math4/util/Pair.java index 6bdecdfdf..487cdced6 100644 --- a/src/main/java/org/apache/commons/math4/util/Pair.java +++ b/src/main/java/org/apache/commons/math4/util/Pair.java @@ -133,6 +133,7 @@ public class Pair { return result; } + /** {@inheritDoc} */ @Override public String toString() { return "[" + getKey() + ", " + getValue() + "]";