commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1239390 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/integration/ test/java/org/apache/commons/math/analysis/integration/ test/java/org/apache/commons/math/distribution/
Date Wed, 01 Feb 2012 23:04:21 GMT
Author: erans
Date: Wed Feb  1 23:04:20 2012
New Revision: 1239390

URL: http://svn.apache.org/viewvc?rev=1239390&view=rev
Log:
MATH-707
Renamed "UnivariateRealIntegrator" to "UnivariateIntegrator" and
"UnivariateRealIntegratorImpl" to "BaseAbstractUnivariateIntegrator".

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/BaseAbstractUnivariateIntegrator.java
      - copied, changed from r1239164, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateIntegrator.java
      - copied, changed from r1239164, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java
Removed:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/AbstractRealDistributionTest.java

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/BaseAbstractUnivariateIntegrator.java
(from r1239164, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/BaseAbstractUnivariateIntegrator.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/BaseAbstractUnivariateIntegrator.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java&r1=1239164&r2=1239390&rev=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/BaseAbstractUnivariateIntegrator.java
Wed Feb  1 23:04:20 2012
@@ -33,7 +33,7 @@ import org.apache.commons.math.util.Math
  * @version $Id$
  * @since 1.2
  */
-public abstract class UnivariateRealIntegratorImpl implements UnivariateRealIntegrator {
+public abstract class BaseAbstractUnivariateIntegrator implements UnivariateIntegrator {
 
     /** Default absolute accuracy. */
     public static final double DEFAULT_ABSOLUTE_ACCURACY = 1.0e-15;
@@ -106,7 +106,7 @@ public abstract class UnivariateRealInte
      * @exception NumberIsTooSmallException if maximal number of iterations
      * is lesser than or equal to the minimal number of iterations
      */
-    protected UnivariateRealIntegratorImpl(final double relativeAccuracy,
+    protected BaseAbstractUnivariateIntegrator(final double relativeAccuracy,
                                            final double absoluteAccuracy,
                                            final int minimalIterationCount,
                                            final int maximalIterationCount)
@@ -137,7 +137,7 @@ public abstract class UnivariateRealInte
      * @param relativeAccuracy relative accuracy of the result
      * @param absoluteAccuracy absolute accuracy of the result
      */
-    protected UnivariateRealIntegratorImpl(final double relativeAccuracy,
+    protected BaseAbstractUnivariateIntegrator(final double relativeAccuracy,
                                            final double absoluteAccuracy) {
         this(relativeAccuracy, absoluteAccuracy,
              DEFAULT_MIN_ITERATIONS_COUNT, DEFAULT_MAX_ITERATIONS_COUNT);
@@ -152,7 +152,7 @@ public abstract class UnivariateRealInte
      * @exception NumberIsTooSmallException if maximal number of iterations
      * is lesser than or equal to the minimal number of iterations
      */
-    protected UnivariateRealIntegratorImpl(final int minimalIterationCount,
+    protected BaseAbstractUnivariateIntegrator(final int minimalIterationCount,
                                            final int maximalIterationCount)
         throws NotStrictlyPositiveException, NumberIsTooSmallException {
         this(DEFAULT_RELATIVE_ACCURACY, DEFAULT_ABSOLUTE_ACCURACY,

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
Wed Feb  1 23:04:20 2012
@@ -51,7 +51,7 @@ import org.apache.commons.math.util.Fast
  * @since 1.2
  */
 
-public class LegendreGaussIntegrator extends UnivariateRealIntegratorImpl {
+public class LegendreGaussIntegrator extends BaseAbstractUnivariateIntegrator {
 
     /** Abscissas for the 2 points method. */
     private static final double[] ABSCISSAS_2 = {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
Wed Feb  1 23:04:20 2012
@@ -36,7 +36,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 1.2
  */
-public class RombergIntegrator extends UnivariateRealIntegratorImpl {
+public class RombergIntegrator extends BaseAbstractUnivariateIntegrator {
 
     /** Maximal number of iterations for Romberg. */
     public static final int ROMBERG_MAX_ITERATIONS_COUNT = 32;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
Wed Feb  1 23:04:20 2012
@@ -35,7 +35,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 1.2
  */
-public class SimpsonIntegrator extends UnivariateRealIntegratorImpl {
+public class SimpsonIntegrator extends BaseAbstractUnivariateIntegrator {
 
     /** Maximal number of iterations for Simpson. */
     public static final int SIMPSON_MAX_ITERATIONS_COUNT = 64;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
Wed Feb  1 23:04:20 2012
@@ -34,7 +34,7 @@ import org.apache.commons.math.util.Fast
  * @version $Id$
  * @since 1.2
  */
-public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl {
+public class TrapezoidIntegrator extends BaseAbstractUnivariateIntegrator {
 
     /** Maximum number of iterations for trapezoid. */
     public static final int TRAPEZOID_MAX_ITERATIONS_COUNT = 64;
@@ -113,7 +113,7 @@ public class TrapezoidIntegrator extends
      * @throws TooManyEvaluationsException if the maximal number of evaluations
      * is exceeded.
      */
-    double stage(final UnivariateRealIntegratorImpl baseIntegrator, final int n)
+    double stage(final BaseAbstractUnivariateIntegrator baseIntegrator, final int n)
         throws TooManyEvaluationsException {
 
         if (n == 0) {

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateIntegrator.java
(from r1239164, commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateIntegrator.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateIntegrator.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java&r1=1239164&r2=1239390&rev=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/UnivariateIntegrator.java
Wed Feb  1 23:04:20 2012
@@ -28,7 +28,7 @@ import org.apache.commons.math.exception
  * @version $Id$
  * @since 1.2
  */
-public interface UnivariateRealIntegrator {
+public interface UnivariateIntegrator {
 
     /**
      * Get the actual relative accuracy.

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
Wed Feb  1 23:04:20 2012
@@ -33,7 +33,7 @@ public class LegendreGaussIntegratorTest
     @Test
     public void testSinFunction() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealIntegratorImpl integrator = new LegendreGaussIntegrator(5, 1.0e-14,
1.0e-10, 2, 15);
+        BaseAbstractUnivariateIntegrator integrator = new LegendreGaussIntegrator(5, 1.0e-14,
1.0e-10, 2, 15);
         double min, max, expected, result, tolerance;
 
         min = 0; max = FastMath.PI; expected = 2;
@@ -52,11 +52,11 @@ public class LegendreGaussIntegratorTest
     @Test
     public void testQuinticFunction() {
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealIntegrator integrator =
+        UnivariateIntegrator integrator =
                 new LegendreGaussIntegrator(3,
-                                            UnivariateRealIntegratorImpl.DEFAULT_RELATIVE_ACCURACY,
-                                            UnivariateRealIntegratorImpl.DEFAULT_ABSOLUTE_ACCURACY,
-                                            UnivariateRealIntegratorImpl.DEFAULT_MIN_ITERATIONS_COUNT,
+                                            BaseAbstractUnivariateIntegrator.DEFAULT_RELATIVE_ACCURACY,
+                                            BaseAbstractUnivariateIntegrator.DEFAULT_ABSOLUTE_ACCURACY,
+                                            BaseAbstractUnivariateIntegrator.DEFAULT_MIN_ITERATIONS_COUNT,
                                             64);
         double min, max, expected, result;
 
@@ -79,9 +79,9 @@ public class LegendreGaussIntegratorTest
         for (int n = 2; n < 6; ++n) {
             LegendreGaussIntegrator integrator =
                 new LegendreGaussIntegrator(n,
-                                            UnivariateRealIntegratorImpl.DEFAULT_RELATIVE_ACCURACY,
-                                            UnivariateRealIntegratorImpl.DEFAULT_ABSOLUTE_ACCURACY,
-                                            UnivariateRealIntegratorImpl.DEFAULT_MIN_ITERATIONS_COUNT,
+                                            BaseAbstractUnivariateIntegrator.DEFAULT_RELATIVE_ACCURACY,
+                                            BaseAbstractUnivariateIntegrator.DEFAULT_ABSOLUTE_ACCURACY,
+                                            BaseAbstractUnivariateIntegrator.DEFAULT_MIN_ITERATIONS_COUNT,
                                             64);
 
             // an n points Gauss-Legendre integrator integrates 2n-1 degree polynoms exactly

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
Wed Feb  1 23:04:20 2012
@@ -43,7 +43,7 @@ public final class RombergIntegratorTest
     @Test
     public void testSinFunction() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealIntegrator integrator = new RombergIntegrator();
+        UnivariateIntegrator integrator = new RombergIntegrator();
         double min, max, expected, result, tolerance;
 
         min = 0; max = FastMath.PI; expected = 2;
@@ -67,7 +67,7 @@ public final class RombergIntegratorTest
     @Test
     public void testQuinticFunction() {
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealIntegrator integrator = new RombergIntegrator();
+        UnivariateIntegrator integrator = new RombergIntegrator();
         double min, max, expected, result, tolerance;
 
         min = 0; max = 1; expected = -1.0/48;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
Wed Feb  1 23:04:20 2012
@@ -42,7 +42,7 @@ public final class SimpsonIntegratorTest
     @Test
     public void testSinFunction() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealIntegrator integrator = new SimpsonIntegrator();
+        UnivariateIntegrator integrator = new SimpsonIntegrator();
         double min, max, expected, result, tolerance;
 
         min = 0; max = FastMath.PI; expected = 2;
@@ -66,7 +66,7 @@ public final class SimpsonIntegratorTest
     @Test
     public void testQuinticFunction() {
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealIntegrator integrator = new SimpsonIntegrator();
+        UnivariateIntegrator integrator = new SimpsonIntegrator();
         double min, max, expected, result, tolerance;
 
         min = 0; max = 1; expected = -1.0/48;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
Wed Feb  1 23:04:20 2012
@@ -42,7 +42,7 @@ public final class TrapezoidIntegratorTe
     @Test
     public void testSinFunction() {
         UnivariateFunction f = new SinFunction();
-        UnivariateRealIntegrator integrator = new TrapezoidIntegrator();
+        UnivariateIntegrator integrator = new TrapezoidIntegrator();
         double min, max, expected, result, tolerance;
 
         min = 0; max = FastMath.PI; expected = 2;
@@ -66,7 +66,7 @@ public final class TrapezoidIntegratorTe
     @Test
     public void testQuinticFunction() {
         UnivariateFunction f = new QuinticFunction();
-        UnivariateRealIntegrator integrator = new TrapezoidIntegrator();
+        UnivariateIntegrator integrator = new TrapezoidIntegrator();
         double min, max, expected, result, tolerance;
 
         min = 0; max = 1; expected = -1.0/48;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/AbstractRealDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/AbstractRealDistributionTest.java?rev=1239390&r1=1239389&r2=1239390&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/AbstractRealDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/AbstractRealDistributionTest.java
Wed Feb  1 23:04:20 2012
@@ -18,7 +18,7 @@ package org.apache.commons.math.distribu
 
 import org.apache.commons.math.analysis.UnivariateFunction;
 import org.apache.commons.math.analysis.integration.RombergIntegrator;
-import org.apache.commons.math.analysis.integration.UnivariateRealIntegrator;
+import org.apache.commons.math.analysis.integration.UnivariateIntegrator;
 import org.apache.commons.math.exception.OutOfRangeException;
 import org.junit.Assert;
 import org.junit.Test;
@@ -156,7 +156,7 @@ public class AbstractRealDistributionTes
                         return x * density(x);
                     }
                 };
-                final UnivariateRealIntegrator integrator = new RombergIntegrator();
+                final UnivariateIntegrator integrator = new RombergIntegrator();
                 return integrator.integrate(Integer.MAX_VALUE, f, x0, x4);
             }
 
@@ -168,7 +168,7 @@ public class AbstractRealDistributionTes
                         return x * x * density(x);
                     }
                 };
-                final UnivariateRealIntegrator integrator = new RombergIntegrator();
+                final UnivariateIntegrator integrator = new RombergIntegrator();
                 final double meanX2 = integrator.integrate(Integer.MAX_VALUE,
                         f, x0, x4);
                 return meanX2 - meanX * meanX;



Mime
View raw message