You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2015/02/04 14:11:36 UTC

[1/4] [math] Javadoc

Repository: commons-math
Updated Branches:
  refs/heads/master 859de3fcb -> 68e6de351


Javadoc

MATH-1201


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/c7fcb448
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/c7fcb448
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/c7fcb448

Branch: refs/heads/master
Commit: c7fcb448c99ae5fe9db9b217bea1233df3ee6e57
Parents: 859de3f
Author: Gilles <er...@apache.org>
Authored: Wed Feb 4 13:56:35 2015 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 4 13:56:35 2015 +0100

----------------------------------------------------------------------
 .../solvers/BaseAbstractUnivariateSolver.java        | 10 +++++++---
 .../commons/math3/analysis/solvers/BrentSolver.java  | 15 +++++++++++++--
 2 files changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/c7fcb448/src/main/java/org/apache/commons/math3/analysis/solvers/BaseAbstractUnivariateSolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/solvers/BaseAbstractUnivariateSolver.java b/src/main/java/org/apache/commons/math3/analysis/solvers/BaseAbstractUnivariateSolver.java
index 6aeba90..4fb9ecf 100644
--- a/src/main/java/org/apache/commons/math3/analysis/solvers/BaseAbstractUnivariateSolver.java
+++ b/src/main/java/org/apache/commons/math3/analysis/solvers/BaseAbstractUnivariateSolver.java
@@ -29,6 +29,10 @@ import org.apache.commons.math3.util.MathUtils;
 /**
  * Provide a default implementation for several functions useful to generic
  * solvers.
+ * The default values for relative and function tolerances are 1e-14
+ * and 1e-15, respectively. It is however highly recommended to not
+ * rely on the default, but rather carefully consider values that match
+ * user's expectations, as well as the specifics of each implementation.
  *
  * @param <FUNC> Type of function to solve.
  *
@@ -75,7 +79,7 @@ public abstract class BaseAbstractUnivariateSolver<FUNC extends UnivariateFuncti
      * @param absoluteAccuracy Maximum absolute error.
      */
     protected BaseAbstractUnivariateSolver(final double relativeAccuracy,
-                                               final double absoluteAccuracy) {
+                                           final double absoluteAccuracy) {
         this(relativeAccuracy,
              absoluteAccuracy,
              DEFAULT_FUNCTION_VALUE_ACCURACY);
@@ -89,8 +93,8 @@ public abstract class BaseAbstractUnivariateSolver<FUNC extends UnivariateFuncti
      * @param functionValueAccuracy Maximum function value error.
      */
     protected BaseAbstractUnivariateSolver(final double relativeAccuracy,
-                                               final double absoluteAccuracy,
-                                               final double functionValueAccuracy) {
+                                           final double absoluteAccuracy,
+                                           final double functionValueAccuracy) {
         this.absoluteAccuracy = absoluteAccuracy;
         this.relativeAccuracy = relativeAccuracy;
         this.functionValueAccuracy = functionValueAccuracy;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/c7fcb448/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java b/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
index d9c4023..f9da26e 100644
--- a/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
+++ b/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
@@ -29,10 +29,19 @@ import org.apache.commons.math3.util.Precision;
  * The function should be continuous but not necessarily smooth.
  * The {@code solve} method returns a zero {@code x} of the function {@code f}
  * in the given interval {@code [a, b]} to within a tolerance
- * {@code 6 eps abs(x) + t} where {@code eps} is the relative accuracy and
+ * {@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 reference implementation is given in chapter 4 of
+ *  <quote>
+ *   <b>Algorithms for Minimization Without Derivatives</b><br>
+ *   <em>Richard P. Brent</em><br>
+ *   Dover, 2002<br>
+ *  </quote>
+ * </p>
  *
+ * @see BaseAbstractUnivariateSolver
  */
 public class BrentSolver extends AbstractUnivariateSolver {
 
@@ -40,7 +49,7 @@ public class BrentSolver extends AbstractUnivariateSolver {
     private static final double DEFAULT_ABSOLUTE_ACCURACY = 1e-6;
 
     /**
-     * Construct a solver with default accuracy (1e-6).
+     * Construct a solver with default absolute accuracy (1e-6).
      */
     public BrentSolver() {
         this(DEFAULT_ABSOLUTE_ACCURACY);
@@ -69,6 +78,8 @@ public class BrentSolver extends AbstractUnivariateSolver {
      * @param relativeAccuracy Relative accuracy.
      * @param absoluteAccuracy Absolute accuracy.
      * @param functionValueAccuracy Function value accuracy.
+     *
+     * @see BaseAbstractUnivariateSolver#BaseAbstractUnivariateSolver(double,double,double)
      */
     public BrentSolver(double relativeAccuracy,
                        double absoluteAccuracy,


[3/4] [math] HTML cleanup

Posted by er...@apache.org.
HTML cleanup


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/a25b7b58
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/a25b7b58
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/a25b7b58

Branch: refs/heads/master
Commit: a25b7b584677c08c00d326d3d77f03ebb662262c
Parents: 98d49ae
Author: Gilles <er...@apache.org>
Authored: Wed Feb 4 14:09:37 2015 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 4 14:09:37 2015 +0100

----------------------------------------------------------------------
 .../analysis/integration/gauss/HermiteRuleFactory.java    | 10 +++++-----
 .../interpolation/TricubicInterpolatingFunction.java      | 10 +++++-----
 .../commons/math3/analysis/solvers/BrentSolver.java       |  8 ++++----
 .../commons/math3/analysis/solvers/LaguerreSolver.java    |  8 ++++----
 .../commons/math3/distribution/PoissonDistribution.java   |  8 ++++----
 5 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/a25b7b58/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
index bc430cf..3d873ab 100644
--- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
+++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
@@ -41,11 +41,11 @@ import org.apache.commons.math3.util.FastMath;
  * The initial interval for the application of the bisection method is
  * based on the roots of the previous Hermite polynomial (interlacing).
  * Upper and lower bounds of these roots are provided by
- * <quote>
- *  I. Krasikov,
- *  <em>Nonnegative quadratic forms and bounds on orthogonal polynomials</em>,
- *  Journal of Approximation theory <b>111</b>, 31-49
- * </quote>
+ * <blockquote>
+ *  I. Krasikov,<br>
+ *  <em>Nonnegative quadratic forms and bounds on orthogonal polynomials</em>,<br>
+ *  Journal of Approximation theory <b>111</b>, 31-49<br>
+ * </blockquote>
  *
  * @since 3.3
  */

http://git-wip-us.apache.org/repos/asf/commons-math/blob/a25b7b58/src/main/java/org/apache/commons/math3/analysis/interpolation/TricubicInterpolatingFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/interpolation/TricubicInterpolatingFunction.java b/src/main/java/org/apache/commons/math3/analysis/interpolation/TricubicInterpolatingFunction.java
index eaea339..9344d89 100644
--- a/src/main/java/org/apache/commons/math3/analysis/interpolation/TricubicInterpolatingFunction.java
+++ b/src/main/java/org/apache/commons/math3/analysis/interpolation/TricubicInterpolatingFunction.java
@@ -27,11 +27,11 @@ import org.apache.commons.math3.util.MathArrays;
  * Function that implements the
  * <a href="http://en.wikipedia.org/wiki/Tricubic_interpolation">
  * tricubic spline interpolation</a>, as proposed in
- * <quote>
- *  Tricubic interpolation in three dimensions<br/>
- *  F. Lekien and J. Marsden<br/>
- *  <em>Int. J. Numer. Meth. Eng</em> 2005; <b>63</b>:455-471
- * </quote>
+ * <blockquote>
+ *  Tricubic interpolation in three dimensions<br>
+ *  F. Lekien and J. Marsden<br>
+ *  <em>Int. J. Numer. Meth. Eng</em> 2005; <b>63</b>:455-471<br>
+ * </blockquote>
  *
  * @since 3.4.
  */

http://git-wip-us.apache.org/repos/asf/commons-math/blob/a25b7b58/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java b/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
index f9da26e..0cc8750 100644
--- a/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
+++ b/src/main/java/org/apache/commons/math3/analysis/solvers/BrentSolver.java
@@ -34,11 +34,11 @@ import org.apache.commons.math3.util.Precision;
  * The given interval must bracket the root.
  * <p>
  *  The reference implementation is given in chapter 4 of
- *  <quote>
+ *  <blockquote>
  *   <b>Algorithms for Minimization Without Derivatives</b><br>
  *   <em>Richard P. Brent</em><br>
  *   Dover, 2002<br>
- *  </quote>
+ *  </blockquote>
  * </p>
  *
  * @see BaseAbstractUnivariateSolver
@@ -137,11 +137,11 @@ public class BrentSolver extends AbstractUnivariateSolver {
      * Search for a zero inside the provided interval.
      * This implementation is based on the algorithm described at page 58 of
      * the book
-     * <quote>
+     * <blockquote>
      *  <b>Algorithms for Minimization Without Derivatives</b>
      *  <it>Richard P. Brent</it>
      *  Dover 0-486-41998-3
-     * </quote>
+     * </blockquote>
      *
      * @param lo Lower bound of the search interval.
      * @param hi Higher bound of the search interval.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/a25b7b58/src/main/java/org/apache/commons/math3/analysis/solvers/LaguerreSolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/solvers/LaguerreSolver.java b/src/main/java/org/apache/commons/math3/analysis/solvers/LaguerreSolver.java
index 1045fc0..c127b42 100644
--- a/src/main/java/org/apache/commons/math3/analysis/solvers/LaguerreSolver.java
+++ b/src/main/java/org/apache/commons/math3/analysis/solvers/LaguerreSolver.java
@@ -31,10 +31,10 @@ import org.apache.commons.math3.util.FastMath;
  * Implements the <a href="http://mathworld.wolfram.com/LaguerresMethod.html">
  * Laguerre's Method</a> for root finding of real coefficient polynomials.
  * For reference, see
- * <quote>
- *  <b>A First Course in Numerical Analysis</b>
- *  ISBN 048641454X, chapter 8.
- * </quote>
+ * <blockquote>
+ *  <b>A First Course in Numerical Analysis</b><br>
+ *  ISBN 048641454X, chapter 8.<br>
+ * </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.
  * The algorithm requires a bracketing condition.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/a25b7b58/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java b/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
index f748081..0d885e9 100644
--- a/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
@@ -287,10 +287,10 @@ public class PoissonDistribution extends AbstractIntegerDistribution {
      *   The Poisson process (and hence value returned) is bounded by 1000 * mean.
      *  </li>
      *  <li>For large means, uses the rejection algorithm described in
-     *   <quote>
-     *    Devroye, Luc. (1981).<i>The Computer Generation of Poisson Random Variables</i>
-     *    <strong>Computing</strong> vol. 26 pp. 197-207.
-     *   </quote>
+     *   <blockquote>
+     *    Devroye, Luc. (1981).<i>The Computer Generation of Poisson Random Variables</i><br>
+     *    <strong>Computing</strong> vol. 26 pp. 197-207.<br>
+     *   </blockquote>
      *  </li>
      * </ul>
      * </p>


[4/4] [math] Javadoc

Posted by er...@apache.org.
Javadoc


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/68e6de35
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/68e6de35
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/68e6de35

Branch: refs/heads/master
Commit: 68e6de35192df884badefc3d189db0c54a56d939
Parents: a25b7b5
Author: Gilles <er...@apache.org>
Authored: Wed Feb 4 14:10:33 2015 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 4 14:10:33 2015 +0100

----------------------------------------------------------------------
 .../commons/math3/stat/descriptive/DescriptiveStatisticsTest.java  | 2 +-
 .../commons/math3/stat/descriptive/SummaryStatisticsTest.java      | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/68e6de35/src/test/java/org/apache/commons/math3/stat/descriptive/DescriptiveStatisticsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/stat/descriptive/DescriptiveStatisticsTest.java b/src/test/java/org/apache/commons/math3/stat/descriptive/DescriptiveStatisticsTest.java
index 462a739..d9e6aa9 100644
--- a/src/test/java/org/apache/commons/math3/stat/descriptive/DescriptiveStatisticsTest.java
+++ b/src/test/java/org/apache/commons/math3/stat/descriptive/DescriptiveStatisticsTest.java
@@ -30,7 +30,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 /**
- * Test cases for the DescriptiveStatistics class.
+ * Test cases for the {@link DescriptiveStatistics} class.
  */
 public class DescriptiveStatisticsTest {
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/68e6de35/src/test/java/org/apache/commons/math3/stat/descriptive/SummaryStatisticsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/stat/descriptive/SummaryStatisticsTest.java b/src/test/java/org/apache/commons/math3/stat/descriptive/SummaryStatisticsTest.java
index 40ddf28..e1a1f98 100644
--- a/src/test/java/org/apache/commons/math3/stat/descriptive/SummaryStatisticsTest.java
+++ b/src/test/java/org/apache/commons/math3/stat/descriptive/SummaryStatisticsTest.java
@@ -28,9 +28,7 @@ import org.junit.Assert;
 import org.junit.Test;
 /**
  * Test cases for the {@link SummaryStatistics} class.
- *
  */
-
 public class SummaryStatisticsTest {
 
     private double one = 1;


[2/4] [math] Typo

Posted by er...@apache.org.
Typo


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/98d49ae5
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/98d49ae5
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/98d49ae5

Branch: refs/heads/master
Commit: 98d49ae58c0f69dd3787cbffdfb67b4f73ba4282
Parents: c7fcb44
Author: Gilles <er...@apache.org>
Authored: Wed Feb 4 13:57:58 2015 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 4 13:57:58 2015 +0100

----------------------------------------------------------------------
 .../math3/analysis/integration/gauss/HermiteRuleFactory.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/98d49ae5/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
index c49ab74..bc430cf 100644
--- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
+++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/HermiteRuleFactory.java
@@ -32,7 +32,7 @@ import org.apache.commons.math3.util.FastMath;
  * </code>
  * <br/>
  * Recurrence relation and weights computation follow
- * <a href="http://en.wikipedia.org/wiki/Abramowitz_and_Stegun"
+ * <a href="http://en.wikipedia.org/wiki/Abramowitz_and_Stegun">
  * Abramowitz and Stegun, 1964</a>.
  * <br/>
  * The coefficients of the standard Hermite polynomials grow very rapidly;