Repository: commons-math Updated Branches: refs/heads/master f0943a724 -> 8bcf7e23a
Javadoc fixes. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/8bcf7e23 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/8bcf7e23 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/8bcf7e23 Branch: refs/heads/master Commit: 8bcf7e23a62878d1efe3bbc1c57287d25d161bab Parents: f0943a7 Author: Phil Steitz <[email protected]> Authored: Mon Dec 28 14:13:45 2015 -0700 Committer: Phil Steitz <[email protected]> Committed: Mon Dec 28 14:13:45 2015 -0700 ---------------------------------------------------------------------- .../interpolation/SplineInterpolator.java | 2 +- .../solvers/BracketingNthOrderBrentSolver.java | 5 ++-- .../math4/analysis/solvers/BrentSolver.java | 13 +++++------ .../FieldBracketingNthOrderBrentSolver.java | 7 +++--- .../math4/analysis/solvers/LaguerreSolver.java | 14 ++++++------ .../math4/analysis/solvers/MullerSolver.java | 2 +- .../math4/analysis/solvers/MullerSolver2.java | 10 ++++---- .../analysis/solvers/UnivariateSolverUtils.java | 24 +++++++++++--------- 8 files changed, 38 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/interpolation/SplineInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/interpolation/SplineInterpolator.java b/src/main/java/org/apache/commons/math4/analysis/interpolation/SplineInterpolator.java index 8de5532..77dc7b1 100644 --- a/src/main/java/org/apache/commons/math4/analysis/interpolation/SplineInterpolator.java +++ b/src/main/java/org/apache/commons/math4/analysis/interpolation/SplineInterpolator.java @@ -29,7 +29,7 @@ import org.apache.commons.math4.util.MathArrays; * <p> * The {@link #interpolate(double[], double[])} method returns a {@link PolynomialSplineFunction} * consisting of n cubic polynomials, defined over the subintervals determined by the x values, - * @code{x[0] < x[i] ... < x[n].} The x values are referred to as "knot points."</p> + * {@code x[0] < x[i] ... < x[n].} The x values are referred to as "knot points."</p> * <p> * The value of the PolynomialSplineFunction at a point x that is greater than or equal to the smallest * knot point and strictly less than the largest knot point is computed by finding the subinterval to which http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/BracketingNthOrderBrentSolver.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/BracketingNthOrderBrentSolver.java b/src/main/java/org/apache/commons/math4/analysis/solvers/BracketingNthOrderBrentSolver.java index 65efde3..e519f02 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/BracketingNthOrderBrentSolver.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/BracketingNthOrderBrentSolver.java @@ -36,9 +36,8 @@ import org.apache.commons.math4.util.Precision; * to user specified {@link AllowedSolution},</li> * <li>the maximal order for the invert polynomial root search is * user-specified instead of being invert quadratic only</li> - * </ul> - * </p> - * The given interval must bracket the root. + * </ul><p> + * The given interval must bracket the root.</p> * */ public class BracketingNthOrderBrentSolver http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/BrentSolver.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/BrentSolver.java b/src/main/java/org/apache/commons/math4/analysis/solvers/BrentSolver.java index 0d2afee..3b9f322 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/BrentSolver.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/BrentSolver.java @@ -31,15 +31,14 @@ import org.apache.commons.math4.util.Precision; * in the given interval {@code [a, b]} to within a tolerance * {@code 2 eps abs(x) + t} where {@code eps} is the relative accuracy and * {@code t} is the absolute accuracy. - * The given interval must bracket the root. + * <p>The given interval must bracket the root.</p> * <p> * The reference implementation is given in chapter 4 of * <blockquote> - * <b>Algorithms for Minimization Without Derivatives</b><br> - * <em>Richard P. Brent</em><br> - * Dover, 2002<br> + * <b>Algorithms for Minimization Without Derivatives</b>, + * <em>Richard P. Brent</em>, + * Dover, 2002 * </blockquote> - * </p> * * @see BaseAbstractUnivariateSolver */ @@ -138,8 +137,8 @@ public class BrentSolver extends AbstractUnivariateSolver { * This implementation is based on the algorithm described at page 58 of * the book * <blockquote> - * <b>Algorithms for Minimization Without Derivatives</b> - * <it>Richard P. Brent</it> + * <b>Algorithms for Minimization Without Derivatives</b>, + * <it>Richard P. Brent</it>, * Dover 0-486-41998-3 * </blockquote> * http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/FieldBracketingNthOrderBrentSolver.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/FieldBracketingNthOrderBrentSolver.java b/src/main/java/org/apache/commons/math4/analysis/solvers/FieldBracketingNthOrderBrentSolver.java index 5a65ee2..71a79c4 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/FieldBracketingNthOrderBrentSolver.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/FieldBracketingNthOrderBrentSolver.java @@ -36,12 +36,11 @@ import org.apache.commons.math4.util.Precision; * The changes with respect to the original Brent algorithm are: * <ul> * <li>the returned value is chosen in the current interval according - * to user specified {@link AllowedSolution},</li> + * to user specified {@link AllowedSolution}</li> * <li>the maximal order for the invert polynomial root search is * user-specified instead of being invert quadratic only</li> - * </ul> - * </p> - * The given interval must bracket the root. + * </ul><p> + * The given interval must bracket the root.</p> * * @param <T> the type of the field elements * @since 3.6 http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/LaguerreSolver.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/LaguerreSolver.java b/src/main/java/org/apache/commons/math4/analysis/solvers/LaguerreSolver.java index d21f69a..f233d42 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/LaguerreSolver.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/LaguerreSolver.java @@ -32,8 +32,8 @@ import org.apache.commons.math4.util.FastMath; * Laguerre's Method</a> for root finding of real coefficient polynomials. * For reference, see * <blockquote> - * <b>A First Course in Numerical Analysis</b><br> - * ISBN 048641454X, chapter 8.<br> + * <b>A First Course in Numerical Analysis</b>, + * ISBN 048641454X, chapter 8. * </blockquote> * Laguerre's method is global in the sense that it can start with any initial * approximation and be able to solve all roots from that point. @@ -136,7 +136,7 @@ public class LaguerreSolver extends AbstractPolynomialSolver { * Despite the bracketing condition, the root returned by * {@link LaguerreSolver.ComplexSolver#solve(Complex[],Complex)} may * not be a real zero inside {@code [min, max]}. - * For example, <code>p(x) = x<sup>3</sup> + 1,</code> + * For example, <code> p(x) = x<sup>3</sup> + 1, </code> * with {@code min = -2}, {@code max = 2}, {@code initial = 0}. * When it occurs, this code calls * {@link LaguerreSolver.ComplexSolver#solveAll(Complex[],Complex)} @@ -173,8 +173,8 @@ public class LaguerreSolver extends AbstractPolynomialSolver { /** * Find all complex roots for the polynomial with the given * coefficients, starting from the given initial value. - * <br/> - * Note: This method is not part of the API of {@link BaseUnivariateSolver}. + * <p> + * Note: This method is not part of the API of {@link BaseUnivariateSolver}.</p> * * @param coefficients Polynomial coefficients. * @param initial Start value. @@ -203,8 +203,8 @@ public class LaguerreSolver extends AbstractPolynomialSolver { /** * Find a complex root for the polynomial with the given coefficients, * starting from the given initial value. - * <br/> - * Note: This method is not part of the API of {@link BaseUnivariateSolver}. + * <p> + * Note: This method is not part of the API of {@link BaseUnivariateSolver}.</p> * * @param coefficients Polynomial coefficients. * @param initial Start value. http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver.java b/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver.java index 9a86406..b714399 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver.java @@ -30,7 +30,7 @@ import org.apache.commons.math4.util.FastMath; * Muller's method applies to both real and complex functions, but here we * restrict ourselves to real functions. * This class differs from {@link MullerSolver} in the way it avoids complex - * operations.</p> + * operations.</p><p> * Muller's original method would have function evaluation at complex point. * Since our f(x) is real, we have to find ways to avoid that. Bracketing * condition is one way to go: by requiring bracketing in every iteration, http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver2.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver2.java b/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver2.java index 1cbfdfd..e5d8b9b 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver2.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/MullerSolver2.java @@ -30,15 +30,15 @@ import org.apache.commons.math4.util.FastMath; * Muller's method applies to both real and complex functions, but here we * restrict ourselves to real functions. * This class differs from {@link MullerSolver} in the way it avoids complex - * operations.</p> + * operations.</p><p> * Except for the initial [min, max], it does not require bracketing - * condition, e.g. f(x0), f(x1), f(x2) can have the same sign. If complex - * number arises in the computation, we simply use its modulus as real + * condition, e.g. f(x0), f(x1), f(x2) can have the same sign. If a complex + * number arises in the computation, we simply use its modulus as a real * approximation.</p> * <p> - * Because the interval may not be bracketing, bisection alternative is + * Because the interval may not be bracketing, the bisection alternative is * not applicable here. However in practice our treatment usually works - * well, especially near real zeroes where the imaginary part of complex + * well, especially near real zeroes where the imaginary part of the complex * approximation is often negligible.</p> * <p> * The formulas here do not use divided differences directly.</p> http://git-wip-us.apache.org/repos/asf/commons-math/blob/8bcf7e23/src/main/java/org/apache/commons/math4/analysis/solvers/UnivariateSolverUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/solvers/UnivariateSolverUtils.java b/src/main/java/org/apache/commons/math4/analysis/solvers/UnivariateSolverUtils.java index bfdf07c..2a58880 100644 --- a/src/main/java/org/apache/commons/math4/analysis/solvers/UnivariateSolverUtils.java +++ b/src/main/java/org/apache/commons/math4/analysis/solvers/UnivariateSolverUtils.java @@ -81,8 +81,10 @@ public class UnivariateSolverUtils { return solver.solve(Integer.MAX_VALUE, function, x0, x1); } - /** Force a root found by a non-bracketing solver to lie on a specified side, - * as if the solver was a bracketing one. + /** + * Force a root found by a non-bracketing solver to lie on a specified side, + * as if the solver were a bracketing one. + * * @param maxEval maximal number of new evaluations of the function * (evaluations already done for finding the root should have already been subtracted * from this number) @@ -173,13 +175,13 @@ public class UnivariateSolverUtils { * This method simply calls {@link #bracket(UnivariateFunction, double, double, double, * double, double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)} * with {@code q} and {@code r} set to 1.0 and {@code maximumIterations} set to {@code Integer.MAX_VALUE}. - * <strong>Note: </strong> this method can take - * <code>Integer.MAX_VALUE</code> iterations to throw a - * <code>ConvergenceException.</code> Unless you are confident that there - * is a root between <code>lowerBound</code> and <code>upperBound</code> - * near <code>initial,</code> it is better to use - * {@link #bracket(UnivariateFunction, double, double, double, double, - * double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)}, + * <p> + * <strong>Note: </strong> this method can take {@code Integer.MAX_VALUE} + * iterations to throw a {@code ConvergenceException.} Unless you are + * confident that there is a root between {@code lowerBound} and + * {@code upperBound} near {@code initial}, it is better to use + * {@link #bracket(UnivariateFunction, double, double, double, double,double, int) + * bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)}, * explicitly specifying the maximum number of iterations.</p> * * @param function Function. @@ -244,11 +246,11 @@ public class UnivariateSolverUtils { * The algorithm stops when one of the following happens: <ul> * <li> at least one positive and one negative value have been found -- success!</li> * <li> both endpoints have reached their respective limits -- NoBracketingException </li> - * <li> {@code maximumIterations} iterations elapse -- NoBracketingException </li></ul></p> + * <li> {@code maximumIterations} iterations elapse -- NoBracketingException </li></ul> * <p> * If different signs are found at first iteration ({@code k=1}), then the returned * interval will be \( [a, b] = [l_1, u_1] \). If different signs are found at a later - * iteration ({code k>1}, then the returned interval will be either + * iteration {@code k>1}, then the returned interval will be either * \( [a, b] = [l_{k+1}, l_{k}] \) or \( [a, b] = [u_{k}, u_{k+1}] \). A root solver called * with these parameters will therefore start with the smallest bracketing interval known * at this step.
