As of version 2.0 this no longer implements Serializable
*
* @version $Revision:670469 $ $Date:2008-06-23 10:01:38 +0200 (lun., 23 juin 2008) $
* @since 1.2
*/
public class FastCosineTransformer implements RealTransformer {
- /** serializable version identifier */
- private static final long serialVersionUID = -831323620109865380L;
-
/**
* Construct a default transformer.
*/
Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastHadamardTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastHadamardTransformer.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastHadamardTransformer.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastHadamardTransformer.java Mon Jun 1 00:47:02 2009
@@ -33,9 +33,6 @@
*/
public class FastHadamardTransformer implements RealTransformer {
- /** Serializable version identifier. */
- private static final long serialVersionUID = -720498949613305350L;
-
/** {@inheritDoc} */
public double[] transform(double f[])
throws IllegalArgumentException {
Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastSineTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastSineTransformer.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastSineTransformer.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastSineTransformer.java Mon Jun 1 00:47:02 2009
@@ -33,15 +33,13 @@
* Similar to FFT, we also require the length of data set to be power of 2.
* In addition, the first element must be 0 and it's enforced in function
* transformation after sampling.
- *
+ *
As of version 2.0 this no longer implements Serializable
+ *
* @version $Revision$ $Date$
* @since 1.2
*/
public class FastSineTransformer implements RealTransformer {
- /** serializable version identifier */
- private static final long serialVersionUID = -7557024407476823001L;
-
/**
* Construct a default transformer.
*/
Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/transform/RealTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/transform/RealTransformer.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/transform/RealTransformer.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/transform/RealTransformer.java Mon Jun 1 00:47:02 2009
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math.transform;
-import java.io.Serializable;
-
import org.apache.commons.math.FunctionEvaluationException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.complex.Complex;
@@ -34,7 +32,7 @@
* @version $Revision$ $Date$
* @since 2.0
*/
-public interface RealTransformer extends Serializable {
+public interface RealTransformer {
/**
* Transform the given real data set.
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/FrequencyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/FrequencyTest.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/FrequencyTest.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/FrequencyTest.java Mon Jun 1 00:47:02 2009
@@ -267,5 +267,13 @@
assertTrue(it.next() instanceof Long);
}
}
+
+ public void testSerial() {
+ f.addValue(oneL);
+ f.addValue(twoL);
+ f.addValue(oneI);
+ f.addValue(twoI);
+ assertEquals(f, TestUtils.serializeAndRecover(f));
+ }
}
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java Mon Jun 1 00:47:02 2009
@@ -107,7 +107,6 @@
* A new way to compute the mean
*/
static class deepMean implements UnivariateStatistic {
- private static final long serialVersionUID = 9108665370122541953L;
public double evaluate(double[] values, int begin, int length) {
return 42;
@@ -125,7 +124,6 @@
* Test percentile implementation - wraps a Percentile
*/
static class goodPercentile implements UnivariateStatistic {
- private static final long serialVersionUID = 801005145532790795L;
private Percentile percentile = new Percentile();
public void setQuantile(double quantile) {
percentile.setQuantile(quantile);
@@ -168,7 +166,6 @@
* "Bad" test percentile implementation - no setQuantile
*/
static class badPercentile implements UnivariateStatistic {
- private static final long serialVersionUID = -707437653388052183L;
private Percentile percentile = new Percentile();
public double evaluate(double[] values, int begin, int length) {
return percentile.evaluate(values, begin, length);
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java Mon Jun 1 00:47:02 2009
@@ -86,7 +86,6 @@
* Returns the sum instead of the mean.
*/
static class sumMean implements StorelessUnivariateStatistic {
- private static final long serialVersionUID = 6492471391340853423L;
private double sum = 0;
private long n = 0;
public double evaluate(double[] values, int begin, int length) {
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/StorelessUnivariateStatisticAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/StorelessUnivariateStatisticAbstractTest.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/StorelessUnivariateStatisticAbstractTest.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/StorelessUnivariateStatisticAbstractTest.java Mon Jun 1 00:47:02 2009
@@ -202,4 +202,9 @@
assertTrue(master.equals(replica));
}
+ public void testSerial() {
+ StorelessUnivariateStatistic s =
+ (StorelessUnivariateStatistic) getUnivariateStatistic();
+ assertEquals(s, TestUtils.serializeAndRecover(s));
+ }
}
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java Mon Jun 1 00:47:02 2009
@@ -18,6 +18,7 @@
package org.apache.commons.math.stat.descriptive.moment;
import org.apache.commons.math.DimensionMismatchException;
+import org.apache.commons.math.TestUtils;
import org.apache.commons.math.linear.RealMatrix;
import junit.framework.Test;
@@ -78,6 +79,11 @@
}
+ public void testSerial(){
+ VectorialCovariance stat = new VectorialCovariance(points[0].length, true);
+ assertEquals(stat, TestUtils.serializeAndRecover(stat));
+ }
+
@Override
public void setUp() {
points = new double[][] {
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java?rev=780541&r1=780540&r2=780541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java (original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java Mon Jun 1 00:47:02 2009
@@ -18,6 +18,7 @@
package org.apache.commons.math.stat.descriptive.moment;
import org.apache.commons.math.DimensionMismatchException;
+import org.apache.commons.math.TestUtils;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -70,6 +71,13 @@
}
+ public void testSerial() throws DimensionMismatchException {
+ VectorialMean stat = new VectorialMean(points[0].length);
+ for (int i = 0; i < points.length; ++i) {
+ stat.increment(points[i]);
+ }
+ assertEquals(stat, TestUtils.serializeAndRecover(stat));
+ }
@Override
public void setUp() {
points = new double[][] {