Move Serializable from interface to implementations
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@777894 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b41ff57526
commit
5220875108
|
@ -17,8 +17,6 @@
|
|||
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +24,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @version $Revision$ $Date$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface MultivariateRealFunction extends Serializable {
|
||||
public interface MultivariateRealFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function at the given point.
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +24,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @version $Revision$ $Date$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface MultivariateVectorialFunction extends Serializable {
|
||||
public interface MultivariateVectorialFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function at the given point.
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +24,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @version $Revision$ $Date$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface UnivariateMatrixFunction extends Serializable {
|
||||
public interface UnivariateMatrixFunction {
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +23,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
*
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface UnivariateRealFunction extends Serializable {
|
||||
public interface UnivariateRealFunction {
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +24,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @version $Revision$ $Date$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface UnivariateVectorialFunction extends Serializable {
|
||||
public interface UnivariateVectorialFunction {
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package org.apache.commons.math.optimization;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
import org.apache.commons.math.MathRuntimeException;
|
||||
import org.apache.commons.math.analysis.MultivariateRealFunction;
|
||||
|
@ -54,7 +56,9 @@ import org.apache.commons.math.linear.RealMatrix;
|
|||
* @since 2.0
|
||||
*/
|
||||
|
||||
public class LeastSquaresConverter implements MultivariateRealFunction {
|
||||
public class LeastSquaresConverter implements MultivariateRealFunction, Serializable {
|
||||
// TODO: Add Serializable documentation
|
||||
// TODO: Check Serializable implementation
|
||||
|
||||
/** Serializable version identifier. */
|
||||
private static final long serialVersionUID = -4369653306135732243L;
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
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;
|
||||
|
@ -261,7 +263,9 @@ public class NonLinearConjugateGradientOptimizer
|
|||
* extremum along the search direction.
|
||||
* </p>
|
||||
*/
|
||||
private class LineSearchFunction implements UnivariateRealFunction {
|
||||
private class LineSearchFunction implements UnivariateRealFunction, Serializable {
|
||||
// TODO: Add Serializable documentation
|
||||
// TODO: Check Serializable implementation
|
||||
|
||||
/** Serializable version identifier. */
|
||||
private static final long serialVersionUID = 8184683950487801424L;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -23,7 +25,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
*
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class Expm1Function implements DifferentiableUnivariateRealFunction {
|
||||
public class Expm1Function implements DifferentiableUnivariateRealFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1410052725961159179L;
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -23,7 +25,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
*
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class MonitoredFunction implements UnivariateRealFunction {
|
||||
public class MonitoredFunction implements UnivariateRealFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8403645545888892674L;
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -28,7 +30,7 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
*
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class SinFunction implements DifferentiableUnivariateRealFunction {
|
||||
public class SinFunction implements DifferentiableUnivariateRealFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6422911699694536977L;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package org.apache.commons.math.optimization.general;
|
||||
|
||||
import java.awt.geom.Point2D;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -478,7 +479,7 @@ extends TestCase {
|
|||
|
||||
}
|
||||
|
||||
private static class LinearProblem implements DifferentiableMultivariateVectorialFunction {
|
||||
private static class LinearProblem implements DifferentiableMultivariateVectorialFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8804268799379350190L;
|
||||
final RealMatrix factors;
|
||||
|
@ -503,7 +504,7 @@ extends TestCase {
|
|||
|
||||
}
|
||||
|
||||
private static class Circle implements DifferentiableMultivariateVectorialFunction {
|
||||
private static class Circle implements DifferentiableMultivariateVectorialFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7165774454925027042L;
|
||||
private ArrayList<Point2D.Double> points;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package org.apache.commons.math.optimization.general;
|
||||
|
||||
import java.awt.geom.Point2D;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -518,7 +519,7 @@ public class LevenbergMarquardtOptimizerTest
|
|||
|
||||
}
|
||||
|
||||
private static class LinearProblem implements DifferentiableMultivariateVectorialFunction {
|
||||
private static class LinearProblem implements DifferentiableMultivariateVectorialFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 703247177355019415L;
|
||||
final RealMatrix factors;
|
||||
|
@ -543,7 +544,7 @@ public class LevenbergMarquardtOptimizerTest
|
|||
|
||||
}
|
||||
|
||||
private static class Circle implements DifferentiableMultivariateVectorialFunction {
|
||||
private static class Circle implements DifferentiableMultivariateVectorialFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4711170319243817874L;
|
||||
|
||||
|
@ -624,7 +625,7 @@ public class LevenbergMarquardtOptimizerTest
|
|||
|
||||
}
|
||||
|
||||
private static class QuadraticProblem implements DifferentiableMultivariateVectorialFunction {
|
||||
private static class QuadraticProblem implements DifferentiableMultivariateVectorialFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7072187082052755854L;
|
||||
private List<Double> x;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package org.apache.commons.math.optimization.general;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
@ -510,7 +511,7 @@ public class MinpackTest extends TestCase {
|
|||
}
|
||||
|
||||
private static abstract class MinpackFunction
|
||||
implements DifferentiableMultivariateVectorialFunction {
|
||||
implements DifferentiableMultivariateVectorialFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6209760235478794233L;
|
||||
protected int n;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package org.apache.commons.math.optimization.general;
|
||||
|
||||
import java.awt.geom.Point2D;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
@ -363,7 +364,7 @@ extends TestCase {
|
|||
assertEquals(48.135167894, center.y, 1.0e-8);
|
||||
}
|
||||
|
||||
private static class LinearProblem implements DifferentiableMultivariateRealFunction {
|
||||
private static class LinearProblem implements DifferentiableMultivariateRealFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 703247177355019415L;
|
||||
final RealMatrix factors;
|
||||
|
@ -415,7 +416,7 @@ extends TestCase {
|
|||
|
||||
}
|
||||
|
||||
private static class Circle implements DifferentiableMultivariateRealFunction {
|
||||
private static class Circle implements DifferentiableMultivariateRealFunction, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4711170319243817874L;
|
||||
|
||||
|
|
Loading…
Reference in New Issue