Javadoc fixes.
This commit is contained in:
parent
f0943a7242
commit
8bcf7e23a6
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue