commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r786927 - in /commons/proper/math/trunk/src: java/org/apache/commons/math/ java/org/apache/commons/math/analysis/integration/ java/org/apache/commons/math/analysis/polynomials/ java/org/apache/commons/math/analysis/solvers/ java/org/apache/...
Date Sat, 20 Jun 2009 23:37:49 GMT
Author: billbarker
Date: Sat Jun 20 23:37:47 2009
New Revision: 786927

URL: http://svn.apache.org/viewvc?rev=786927&view=rev
Log:
Remove Serializable from some tranient analitics classes.

Let me know if I've nuked ur favorite one, and I can put it back

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergingAlgorithmImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/MullerSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/RiddersSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/SecantSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/Expm1Function.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/MonitoredFunction.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/QuinticFunction.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/SinFunction.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/ode/FirstOrderConverterTest.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergingAlgorithmImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergingAlgorithmImpl.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergingAlgorithmImpl.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergingAlgorithmImpl.java
Sat Jun 20 23:37:47 2009
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math;
 
-import java.io.Serializable;
 
 /**
  * Provide a default implementation for several functions useful to generic
@@ -26,12 +25,7 @@
  * @version $Revision$ $Date$
  * @since 2.0
  */
-public abstract class ConvergingAlgorithmImpl implements ConvergingAlgorithm, Serializable
{
-
-    /**
-     *  Serialization UID.
-     */
-    private static final long serialVersionUID = 1L;
+public abstract class ConvergingAlgorithmImpl implements ConvergingAlgorithm{
 
     /** Maximum absolute error. */
     protected double absoluteAccuracy;

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
Sat Jun 20 23:37:47 2009
@@ -51,9 +51,6 @@
 
 public class LegendreGaussIntegrator extends UnivariateRealIntegratorImpl {
 
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = -331962723352824098L;
-
     /** Abscissas for the 2 points method. */
     private static final double[] ABSCISSAS_2 = {
         -1.0 / Math.sqrt(3.0),

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
Sat Jun 20 23:37:47 2009
@@ -36,9 +36,6 @@
  */
 public class RombergIntegrator extends UnivariateRealIntegratorImpl {
 
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = 4616482344304576900L;
-
     /**
      * Construct an integrator for the given function.
      * 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
Sat Jun 20 23:37:47 2009
@@ -35,9 +35,6 @@
  */
 public class SimpsonIntegrator extends UnivariateRealIntegratorImpl {
 
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = 2535890386567281329L;
-
     /**
      * Construct an integrator for the given function.
      * 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
Sat Jun 20 23:37:47 2009
@@ -34,9 +34,6 @@
  */
 public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl {
 
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = 6963842845860399200L;
-
     /** Intermediate result. */
     private double s;
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -30,10 +28,7 @@
  *
  * @version $Revision$ $Date$
  */
-public class PolynomialFunction implements DifferentiableUnivariateRealFunction, Serializable
{
-
-    /** Serializable version identifier */
-    private static final long serialVersionUID = -7726511984200295583L;
+public class PolynomialFunction implements DifferentiableUnivariateRealFunction {
 
     /**
      * The coefficients of the polynomial, ordered by degree -- i.e.,  

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.DuplicateSampleAbscissaException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathRuntimeException;
@@ -35,11 +33,7 @@
  * @version $Revision$ $Date$
  * @since 1.2
  */
-public class PolynomialFunctionLagrangeForm implements UnivariateRealFunction,
-    Serializable {
-
-    /** serializable version identifier */
-    static final long serialVersionUID = -3965199246151093920L;
+public class PolynomialFunctionLagrangeForm implements UnivariateRealFunction {
 
     /**
      * The coefficients of the polynomial, ordered by degree -- i.e.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
Sat Jun 20 23:37:47 2009
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-import java.io.Serializable;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -35,11 +34,7 @@
  * @version $Revision$ $Date$
  * @since 1.2
  */
-public class PolynomialFunctionNewtonForm implements UnivariateRealFunction,
-    Serializable {
-
-    /** serializable version identifier */
-    static final long serialVersionUID = -3353896576191389897L;
+public class PolynomialFunctionNewtonForm implements UnivariateRealFunction {
 
     /**
      * The coefficients of the polynomial, ordered by degree -- i.e.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
Sat Jun 20 23:37:47 2009
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-import java.io.Serializable;
 import java.util.Arrays;
 
 import org.apache.commons.math.ArgumentOutsideDomainException;
@@ -59,10 +58,7 @@
  * @version $Revision$ $Date$
  */
 public class PolynomialSplineFunction 
-    implements DifferentiableUnivariateRealFunction, Serializable {
-
-    /** Serializable version identifier */
-    private static final long serialVersionUID = 1619940313389547244L;
+    implements DifferentiableUnivariateRealFunction {
 
     /** Spline segment interval delimiters (knots).   Size is n+1 for n segments. */
     private double knots[];

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.solvers;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MaxIterationsExceededException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -30,11 +28,8 @@
  * 
  * @version $Revision$ $Date$
  */
-public class BisectionSolver extends UnivariateRealSolverImpl implements Serializable {
+public class BisectionSolver extends UnivariateRealSolverImpl {
     
-    /** Serializable version identifier */
-    private static final long serialVersionUID = 5227509383222989438L;
-
     /**
      * Construct a solver for the given function.
      * 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.solvers;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathRuntimeException;
@@ -38,11 +36,7 @@
  * @version $Revision$ $Date$
  * @since 1.2
  */
-public class LaguerreSolver extends UnivariateRealSolverImpl implements Serializable {
-
-    /** serializable version identifier */
-    private static final long serialVersionUID = -3775334783473775723L;
-
+public class LaguerreSolver extends UnivariateRealSolverImpl {
     /** polynomial function to solve.
      * @deprecated as of 2.0 the function is not stored anymore in the instance
      */

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/MullerSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/MullerSolver.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/MullerSolver.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/MullerSolver.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.solvers;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MaxIterationsExceededException;
@@ -37,10 +35,7 @@
  * @version $Revision$ $Date$
  * @since 1.2
  */
-public class MullerSolver extends UnivariateRealSolverImpl implements Serializable {
-
-    /** serializable version identifier */
-    private static final long serialVersionUID = 7768903775784754323L;
+public class MullerSolver extends UnivariateRealSolverImpl {
 
     /**
      * Construct a solver for the given function.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
Sat Jun 20 23:37:47 2009
@@ -17,8 +17,6 @@
 
 package org.apache.commons.math.analysis.solvers;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.MaxIterationsExceededException;
@@ -33,11 +31,8 @@
  *
  * @version $Revision$ $Date$
  */
-public class NewtonSolver extends UnivariateRealSolverImpl implements Serializable {
+public class NewtonSolver extends UnivariateRealSolverImpl {
     
-    /** Serializable version identifier */
-    private static final long serialVersionUID = 7579593514004764309L;
-
     /**
      * Construct a solver for the given function.
      * @param f function to solve.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/RiddersSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/RiddersSolver.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/RiddersSolver.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/RiddersSolver.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.solvers;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MaxIterationsExceededException;
@@ -36,10 +34,7 @@
  * @version $Revision$ $Date$
  * @since 1.2
  */
-public class RiddersSolver extends UnivariateRealSolverImpl implements Serializable {
-
-    /** serializable version identifier */
-    private static final long serialVersionUID = -1556464494585337088L;
+public class RiddersSolver extends UnivariateRealSolverImpl {
 
     /**
      * Construct a solver for the given function.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/SecantSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/SecantSolver.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/SecantSolver.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/SecantSolver.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.solvers;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathRuntimeException;
@@ -41,11 +39,8 @@
  *  
  * @version $Revision$ $Date$
  */
-public class SecantSolver extends UnivariateRealSolverImpl implements Serializable {
+public class SecantSolver extends UnivariateRealSolverImpl {
     
-    /** Serializable version identifier */
-    private static final long serialVersionUID = 2477470651270304246L;
-
     /**
      * Construct a solver for the given function.
      * @param f function to solve.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
Sat Jun 20 23:37:47 2009
@@ -31,9 +31,6 @@
 public abstract class UnivariateRealSolverImpl
     extends ConvergingAlgorithmImpl implements UnivariateRealSolver {
 
-    /** Serializable version ID. */
-    private static final long serialVersionUID = 1L;
-
     /** Maximum error of function. */
     protected double functionValueAccuracy;
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
Sat Jun 20 23:37:47 2009
@@ -68,7 +68,6 @@
         // subclasses can overide if there is a better method.
         UnivariateRealFunction rootFindingFunction =
             new UnivariateRealFunction() {
-            private static final long serialVersionUID = 1043729002768873023L;
             public double value(double x) throws FunctionEvaluationException {
                 try {
                     return cumulativeProbability(x) - p;

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
Sat Jun 20 23:37:47 2009
@@ -17,8 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import java.io.Serializable;
-
 /** This interface represents a second order differential equations set.
 
  * <p>This interface should be implemented by all real second order
@@ -46,7 +44,7 @@
  * @since 1.2
  */
 
-public interface SecondOrderDifferentialEquations extends Serializable {
+public interface SecondOrderDifferentialEquations {
 
   /** Get the dimension of the problem.
    * @return dimension of the problem

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
Sat Jun 20 23:37:47 2009
@@ -17,8 +17,6 @@
 
 package org.apache.commons.math.optimization.general;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -45,10 +43,7 @@
 
 public class NonLinearConjugateGradientOptimizer
     extends AbstractScalarDifferentiableOptimizer
-    implements DifferentiableMultivariateRealOptimizer, Serializable {
-
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = -6545223926568155458L;
+    implements DifferentiableMultivariateRealOptimizer {
 
     /** Update formula for the beta parameter. */
     private final ConjugateGradientFormula updateFormula;
@@ -242,10 +237,7 @@
     }
 
     /** Default identity preconditioner. */
-    private static class IdentityPreconditioner implements Preconditioner, Serializable {
-
-        /** Serializable version identifier. */
-        private static final long serialVersionUID = 1868235977809734023L;
+    private static class IdentityPreconditioner implements Preconditioner {
 
         /** {@inheritDoc} */
         public double[] precondition(double[] variables, double[] r) {
@@ -263,13 +255,7 @@
      * extremum along the search direction.
      * </p>
      */
-    private class LineSearchFunction implements UnivariateRealFunction, Serializable {
-        // TODO: Add Serializable documentation
-        // TODO: Check Serializable implementation
-
-        /** Serializable version identifier. */
-        private static final long serialVersionUID = 8184683950487801424L;
-
+    private class LineSearchFunction implements UnivariateRealFunction {
         /** Search direction. */
         private final double[] searchDirection;
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java
Sat Jun 20 23:37:47 2009
@@ -34,9 +34,6 @@
 public abstract class AbstractUnivariateRealOptimizer
     extends ConvergingAlgorithmImpl implements UnivariateRealOptimizer {
 
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = 4543031162377070699L;
-
     /** Indicates where a root has been computed. */
     protected boolean resultComputed;
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
Sat Jun 20 23:37:47 2009
@@ -31,9 +31,6 @@
  */
 public class BrentOptimizer extends AbstractUnivariateRealOptimizer {
     
-    /** Serializable version identifier */
-    private static final long serialVersionUID = 7185472920191999565L;
-
     /**
      * Golden section.
      */

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/Expm1Function.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/Expm1Function.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/Expm1Function.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/Expm1Function.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.FunctionEvaluationException;
 
 /**
@@ -25,9 +23,7 @@
  *
  * @version $Revision$ $Date$
  */
-public class Expm1Function implements DifferentiableUnivariateRealFunction, Serializable
{
-
-    private static final long serialVersionUID = 1410052725961159179L;
+public class Expm1Function implements DifferentiableUnivariateRealFunction {
 
     public double value(double x) throws FunctionEvaluationException {
         // Math.expm1() is available in jdk 1.5 but not in jdk 1.4.2.
@@ -36,7 +32,6 @@
 
     public UnivariateRealFunction derivative() {
         return new UnivariateRealFunction() {
-            private static final long serialVersionUID = 5621329502844531460L;
             public double value(double x) throws FunctionEvaluationException {
                 return Math.exp(x);
             }

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/MonitoredFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/MonitoredFunction.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/MonitoredFunction.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/MonitoredFunction.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.FunctionEvaluationException;
 
 /**
@@ -25,9 +23,7 @@
  *
  * @version $Revision$ $Date$ 
  */
-public class MonitoredFunction implements UnivariateRealFunction, Serializable {
-
-    private static final long serialVersionUID = -8403645545888892674L;
+public class MonitoredFunction implements UnivariateRealFunction {
 
     public MonitoredFunction(UnivariateRealFunction f) {
         callsCount = 0;

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/QuinticFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/QuinticFunction.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/QuinticFunction.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/QuinticFunction.java
Sat Jun 20 23:37:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis;
 
-import java.io.Serializable;
-
 import org.apache.commons.math.FunctionEvaluationException;
 
 /**
@@ -25,9 +23,7 @@
  *
  * @version $Revision$ $Date$ 
  */
-public class QuinticFunction implements DifferentiableUnivariateRealFunction, Serializable
{
-
-    private static final long serialVersionUID = -8866263034920607152L;
+public class QuinticFunction implements DifferentiableUnivariateRealFunction {
 
     /* Evaluate quintic.
      * @see org.apache.commons.math.UnivariateRealFunction#value(double)
@@ -38,7 +34,6 @@
 
     public UnivariateRealFunction derivative() {
         return new UnivariateRealFunction() {
-            private static final long serialVersionUID = 5265867813333370L;
             public double value(double x) throws FunctionEvaluationException {
                 return (5*x*x-3.75)*x*x+0.25;
             }

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/SinFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/SinFunction.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/SinFunction.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/SinFunction.java Sat
Jun 20 23:37:47 2009
@@ -30,9 +30,7 @@
  * 
  * @version $Revision$ $Date$
  */
-public class SinFunction implements DifferentiableUnivariateRealFunction, Serializable {
-
-    private static final long serialVersionUID = 6422911699694536977L;
+public class SinFunction implements DifferentiableUnivariateRealFunction {
 
     /* Evaluate sinus fuction.
      * @see org.apache.commons.math.UnivariateRealFunction#value(double)
@@ -45,7 +43,6 @@
      */
     public UnivariateRealFunction derivative() {
         return new UnivariateRealFunction() {
-            private static final long serialVersionUID = -309931502404170015L;
             public double value(double x) throws FunctionEvaluationException {
                 return Math.cos(x);
             }

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
Sat Jun 20 23:37:47 2009
@@ -17,7 +17,6 @@
 package org.apache.commons.math.analysis.solvers;
 
 import org.apache.commons.math.MathException;
-import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -184,79 +183,5 @@
         assertEquals(oldValue, solver.getRelativeAccuracy(), 1.0e-2);
     }        
     
-    /**
-     * Test Serialization and Recovery
-     */
-   public void testSerialization() throws MathException {
-       UnivariateRealFunction f = (UnivariateRealFunction)TestUtils.serializeAndRecover(new
QuinticFunction());
-       double result;
-       
-       BisectionSolver solver = new BisectionSolver();
-       UnivariateRealSolver solver2 = (UnivariateRealSolver)TestUtils.serializeAndRecover(solver);
-       
-       result = solver.solve(f, -0.2, 0.2);
-       assertEquals(result, 0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, -0.2, 0.2), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, -0.1, 0.3);
-       assertEquals(result, 0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, -0.1, 0.3), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, -0.3, 0.45);
-       assertEquals(result, 0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, -0.3, 0.45), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.3, 0.7);
-       assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.3, 0.7), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.2, 0.6);
-       assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.2, 0.6), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.05, 0.95);
-       assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.05, 0.95), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.85, 1.25);
-       assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.85, 1.25), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.8, 1.2);
-       assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.8, 1.2), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.85, 1.75);
-       assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.85, 1.75), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.55, 1.45);
-       assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.55, 1.45), result, solver2.getAbsoluteAccuracy());
-       
-       result = solver.solve(f, 0.85, 5);
-       assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-       assertEquals(solver2.solve(f, 0.85, 5), result, solver2.getAbsoluteAccuracy());
-       
-       /* Test Reset */
-       double newValue = 1.0e-2;
-       f = (UnivariateRealFunction)TestUtils.serializeAndRecover(new QuinticFunction());
-       solver = new BisectionSolver();
-       
-       double oldValue = solver.getRelativeAccuracy();
-       solver.setRelativeAccuracy(newValue);
-       solver.resetRelativeAccuracy();
-       assertEquals(oldValue, solver.getRelativeAccuracy(), 1.0e-2);
-       
-       solver2 = (UnivariateRealSolver)TestUtils.serializeAndRecover(solver); 
-       
-       assertEquals(oldValue, solver2.getRelativeAccuracy(), 1.0e-2);
-       
-       solver2.setRelativeAccuracy(newValue);
-       solver2.resetRelativeAccuracy();
-       
-       assertEquals(oldValue, solver2.getRelativeAccuracy(), 1.0e-2);
-       
-   }
    
 }

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
Sat Jun 20 23:37:47 2009
@@ -17,7 +17,6 @@
 package org.apache.commons.math.analysis.solvers;
 
 import org.apache.commons.math.MathException;
-import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
@@ -108,78 +107,4 @@
         assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
     }
     
-    /**
-     * Test Serialization and Recovery
-     */
-    public void testSerialization() throws MathException {
-        DifferentiableUnivariateRealFunction f = new QuinticFunction();
-        double result;
-        
-        NewtonSolver solver = new NewtonSolver();
-        NewtonSolver solver2 = (NewtonSolver)TestUtils.serializeAndRecover(solver);
-        
-        result = solver.solve(f, -0.2, 0.2);
-        assertEquals(result, 0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, -0.2, 0.2), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, -0.1, 0.3);
-        assertEquals(result, 0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, -0.1, 0.3), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, -0.3, 0.45);
-        assertEquals(result, 0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, -0.3, 0.45), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.3, 0.7);
-        assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.3, 0.7), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.2, 0.6);
-        assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.2, 0.6), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.05, 0.95);
-        assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.05, 0.95), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.85, 1.25);
-        assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.85, 1.25), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.8, 1.2);
-        assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.8, 1.2), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.85, 1.75);
-        assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.85, 1.75), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.55, 1.45);
-        assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.55, 1.45), result, solver2.getAbsoluteAccuracy());
-        
-        result = solver.solve(f, 0.85, 5);
-        assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
-        assertEquals(solver2.solve(f, 0.85, 5), result, solver2.getAbsoluteAccuracy());
-        
-        /* Test Reset */
-        double newValue = 1.0e-2;
-        f = new QuinticFunction();
-        solver = new NewtonSolver();
-        
-        double oldValue = solver.getRelativeAccuracy();
-        solver.setRelativeAccuracy(newValue);
-        solver.resetRelativeAccuracy();
-        assertEquals(oldValue, solver.getRelativeAccuracy(), 1.0e-2);
-        
-        solver2 = (NewtonSolver)TestUtils.serializeAndRecover(solver); 
-        
-        assertEquals(oldValue, solver2.getRelativeAccuracy(), 1.0e-2);
-        
-        solver2.setRelativeAccuracy(newValue);
-        solver2.resetRelativeAccuracy();
-        
-        assertEquals(oldValue, solver2.getRelativeAccuracy(), 1.0e-2);
-        
-    }
 }

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/ode/FirstOrderConverterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/ode/FirstOrderConverterTest.java?rev=786927&r1=786926&r2=786927&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/ode/FirstOrderConverterTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/ode/FirstOrderConverterTest.java
Sat Jun 20 23:37:47 2009
@@ -78,9 +78,7 @@
   private static class Equations
     implements SecondOrderDifferentialEquations {
       
-    private static final long serialVersionUID = -7926271579508637558L;
-
-    private int n;
+     private int n;
 
       private double omega2;
       



Mime
View raw message