From 91f737519e7b613d4c4ca3c1f32d4da10e9eac30 Mon Sep 17 00:00:00 2001
From: Phil Steitz
* Legendre-Gauss integrators are efficient integrators that can
- * accurately integrate functions with few functions evaluations. A
+ * accurately integrate functions with few function evaluations. A
* Legendre-Gauss integrator using an n-points quadrature formula can
- * integrate exactly 2n-1 degree polynomialss.
+ * integrate 2n-1 degree polynomials exactly.
*
* These integrators evaluate the function on n carefully chosen
- * abscissas in each step interval (mapped to the canonical [-1 1] interval).
+ * abscissas in each step interval (mapped to the canonical [-1,1] interval).
* The evaluation abscissas are not evenly spaced and none of them are
* at the interval endpoints. This implies the function integrated can be
* undefined at integration interval endpoints.
@@ -231,7 +231,7 @@ public class LegendreGaussIntegrator extends UnivariateRealIntegratorImpl {
* Compute the n-th stage integral.
* @param n number of steps
* @return the value of n-th stage integral
- * @throws TooManyEvaluationsException if the maximal number of evaluations
+ * @throws TooManyEvaluationsException if the maximum number of evaluations
* is exceeded.
*/
private double stage(final int n)
diff --git a/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java b/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
index 78b670210..151443b70 100644
--- a/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
+++ b/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
@@ -24,13 +24,13 @@ import org.apache.commons.math.exception.TooManyEvaluationsException;
import org.apache.commons.math.util.FastMath;
/**
- * Implements the
+ * Implements
* Simpson's Rule for integration of real univariate functions. For
* reference, see Introduction to Numerical Analysis, ISBN 038795452X,
* chapter 3.
*
- * This implementation employs basic trapezoid rule as building blocks to
- * calculate the Simpson's rule of alternating 2/3 and 4/3.
@@ -36,7 +36,7 @@ import org.apache.commons.math.util.FastMath; */ public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl { - /** Maximal number of iterations for trapezoid. */ + /** Maximum number of iterations for trapezoid. */ public static final int TRAPEZOID_MAX_ITERATIONS_COUNT = 64; /** Intermediate result. */ @@ -105,7 +105,7 @@ public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl { *
* The interval is divided equally into 2^n sections rather than an * arbitrary m sections because this configuration can best utilize the - * alrealy computed values.
+ * already computed values. * * @param baseIntegrator integrator holding integration parameters * @param n the stage of 1/2 refinement, n = 0 is no refinement diff --git a/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java b/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java index abef2af36..1cc7eb933 100644 --- a/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java +++ b/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java @@ -65,8 +65,8 @@ public interface UnivariateRealIntegrator { * @param min the min bound for the interval * @param max the upper bound for the interval * @return the value of integral - * @throws TooManyEvaluationsException if the maximal number of evaluations - * is exceeded. + * @throws TooManyEvaluationsException if the maximum number of function + * evaluations is exceeded. * @throws MaxCountExceededException if the maximum iteration count is exceeded * or the integrator detects convergence problems otherwise * @throws MathIllegalArgumentException if min > max or the endpoints do not diff --git a/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java b/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java index 7e15db354..9ad398ced 100644 --- a/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java +++ b/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java @@ -194,8 +194,8 @@ public abstract class UnivariateRealIntegratorImpl implements UnivariateRealInte * * @param point Point at which the objective function must be evaluated. * @return the objective function value at specified point. - * @throws TooManyEvaluationsException if the maximal number of evaluations - * is exceeded. + * @throws TooManyEvaluationsException if the maximal number of function + * evaluations is exceeded. */ protected double computeObjectiveValue(final double point) throws TooManyEvaluationsException {