diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/Frequency.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/Frequency.java
index e79858bbe..e41aa646e 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/Frequency.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/Frequency.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat;
-import java.io.Serializable;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collection;
@@ -39,10 +38,7 @@ import org.apache.commons.math4.legacy.exception.util.LocalizedFormats;
*
* @param
* Note: this class is NOT thread-safe.
*/
-class ResizableDoubleArray implements DoubleArray, Serializable { // Not in public API.
- /** Serializable version identifier. */
- private static final long serialVersionUID = -3485529955529426875L;
-
+class ResizableDoubleArray implements DoubleArray { // Not in public API.
/** Default value for initial capacity. */
private static final int DEFAULT_INITIAL_CAPACITY = 16;
/** Default value for array size modifier. */
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValues.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValues.java
index 6e454d1f8..f0eecc320 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValues.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValues.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive;
-import java.io.Serializable;
-
import org.apache.commons.math4.core.jdkmath.JdkMath;
import org.apache.commons.numbers.core.Precision;
@@ -25,12 +23,8 @@ import org.apache.commons.numbers.core.Precision;
* Value object representing the results of a univariate statistical summary.
*
*/
-public class StatisticalSummaryValues implements Serializable,
- StatisticalSummary {
-
- /** Serialization id. */
- private static final long serialVersionUID = -5108854841843722536L;
-
+public class StatisticalSummaryValues
+ implements StatisticalSummary {
/** The sample mean. */
private final double mean;
@@ -188,5 +182,4 @@ public class StatisticalSummaryValues implements Serializable,
outBuffer.append("sum: ").append(getSum()).append(endl);
return outBuffer.toString();
}
-
}
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatistics.java
index c0935c613..9ed87a508 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatistics.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatistics.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalStateException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.exception.util.LocalizedFormats;
@@ -56,11 +54,7 @@ import org.apache.commons.numbers.core.Precision;
* threads is required.
* increment()
or
* clear()
method, it must be synchronized externally.
increment()
or
* clear()
method, it must be synchronized externally.
*/
-class FourthMoment extends ThirdMoment implements Serializable{
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+class FourthMoment extends ThirdMoment {
/** fourth moment of values that have been added. */
private double m4;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/GeometricMean.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/GeometricMean.java
index 7c6d0755c..5d9fee507 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/GeometricMean.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/GeometricMean.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.MathIllegalStateException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
@@ -48,11 +46,7 @@ import org.apache.commons.math4.core.jdkmath.JdkMath;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class GeometricMean extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class GeometricMean extends AbstractStorelessUnivariateStatistic {
/** Wrapped SumOfLogs instance. */
private StorelessUnivariateStatistic sumOfLogs;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Kurtosis.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Kurtosis.java
index a6f021d19..cdbf7d0cb 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Kurtosis.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Kurtosis.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -45,11 +43,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Kurtosis extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Kurtosis extends AbstractStorelessUnivariateStatistic {
/**Fourth Moment on which this statistic is based. */
protected FourthMoment moment;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Mean.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Mean.java
index 50dc944fa..3fab9af72 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Mean.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Mean.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -60,11 +58,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* clear()
method, it must be synchronized externally.
*/
public class Mean extends AbstractStorelessUnivariateStatistic
- implements Serializable, WeightedEvaluation {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+ implements WeightedEvaluation {
/** First moment on which this statistic is based. */
protected FirstMoment moment;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SecondMoment.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SecondMoment.java
index 44f9bc31c..44f2dbb56 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SecondMoment.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SecondMoment.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.NullArgumentException;
/**
@@ -44,11 +42,7 @@ import org.apache.commons.math4.legacy.exception.NullArgumentException;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class SecondMoment extends FirstMoment implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class SecondMoment extends FirstMoment {
/** second moment of values that have been added. */
protected double m2;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SemiVariance.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SemiVariance.java
index 5d77c6059..0eca2d186 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SemiVariance.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/SemiVariance.java
@@ -17,8 +17,6 @@
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractUnivariateStatistic;
@@ -51,7 +49,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
*
* @since 2.1
*/
-public class SemiVariance extends AbstractUnivariateStatistic implements Serializable {
+public class SemiVariance extends AbstractUnivariateStatistic {
/**
* The UPSIDE Direction is used to specify that the observations above the
@@ -65,9 +63,6 @@ public class SemiVariance extends AbstractUnivariateStatistic implements Seriali
*/
public static final Direction DOWNSIDE_VARIANCE = Direction.DOWNSIDE;
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
/**
* Determines whether or not bias correction is applied when computing the
* value of the statistic. True means that bias is corrected.
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Skewness.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Skewness.java
index 9fd057921..06b839902 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Skewness.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Skewness.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -44,11 +42,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Skewness extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Skewness extends AbstractStorelessUnivariateStatistic {
/** The value below which the variance is considered zero and thus skewness is zero. */
private static final double ZERO_VARIANCE_THRESHOLD = 10E-20;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/StandardDeviation.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/StandardDeviation.java
index 26ecef220..419676c4d 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/StandardDeviation.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/StandardDeviation.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -38,12 +36,7 @@ import org.apache.commons.math4.core.jdkmath.JdkMath;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class StandardDeviation extends AbstractStorelessUnivariateStatistic
- implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class StandardDeviation extends AbstractStorelessUnivariateStatistic {
/** Wrapped Variance instance. */
private Variance variance;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/ThirdMoment.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/ThirdMoment.java
index bf16bf83e..23f025349 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/ThirdMoment.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/ThirdMoment.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.NullArgumentException;
@@ -47,11 +45,7 @@ import org.apache.commons.math4.legacy.exception.NullArgumentException;
* clear()
method, it must be synchronized externally.
*
*/
-class ThirdMoment extends SecondMoment implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+class ThirdMoment extends SecondMoment {
/** third moment of values that have been added. */
protected double m3;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Variance.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Variance.java
index 415bbb1f4..e31c62506 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Variance.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/Variance.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.exception.util.LocalizedFormats;
@@ -65,11 +63,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Variance extends AbstractStorelessUnivariateStatistic implements Serializable, WeightedEvaluation {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Variance extends AbstractStorelessUnivariateStatistic implements WeightedEvaluation {
/** SecondMoment is used in incremental calculation of Variance. */
protected SecondMoment moment;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovariance.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovariance.java
index c8b5b5aa6..d602105be 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovariance.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovariance.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
@@ -27,11 +26,7 @@ import org.apache.commons.math4.legacy.linear.RealMatrix;
* Returns the covariance matrix of the available vectors.
* @since 1.2
*/
-public class VectorialCovariance implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 4118372414238930270L;
-
+public class VectorialCovariance {
/** Sums for each component. */
private final double[] sums;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMean.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMean.java
index ade4be441..1c505462c 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMean.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMean.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.moment;
-import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
@@ -25,11 +24,7 @@ import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
* Returns the arithmetic mean of the available vectors.
* @since 1.2
*/
-public class VectorialMean implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 8223009086481006892L;
-
+public class VectorialMean {
/** Means for each component. */
private final Mean[] means;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/CentralPivotingStrategy.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/CentralPivotingStrategy.java
index 942737fa6..833d1594f 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/CentralPivotingStrategy.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/CentralPivotingStrategy.java
@@ -16,18 +16,13 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.core.MathArrays;
/**
* A mid point strategy based on the average of begin and end indices.
* @since 3.4
*/
-public class CentralPivotingStrategy implements PivotingStrategy, Serializable {
- /** Serializable UID. */
- private static final long serialVersionUID = 20140713L;
-
+public class CentralPivotingStrategy implements PivotingStrategy {
/**
* {@inheritDoc}
* This in particular picks a average of begin and end indices
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/KthSelector.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/KthSelector.java
index 3211154a7..cad4a4940 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/KthSelector.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/KthSelector.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
@@ -28,10 +27,7 @@ import org.apache.commons.math4.core.jdkmath.JdkMath;
* numbers.
* @since 3.4
*/
-public class KthSelector implements Serializable {
- /** Serializable UID. */
- private static final long serialVersionUID = 20140713L;
-
+public class KthSelector {
/** Minimum selection size for insertion sort rather than selection. */
private static final int MIN_SELECT_SIZE = 15;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Max.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Max.java
index b4db84ef9..038ab5d9a 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Max.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Max.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -37,11 +35,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Max extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Max extends AbstractStorelessUnivariateStatistic {
/** Number of values that have been added. */
private long n;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Median.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Median.java
index b297fe511..00c04853f 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Median.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Median.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.ranking.NaNStrategy;
@@ -32,11 +30,7 @@ import org.apache.commons.math4.legacy.stat.ranking.NaNStrategy;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Median extends Percentile implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Median extends Percentile {
/** Fixed quantile. */
private static final double FIXED_QUANTILE_50 = 50.0;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/MedianOf3PivotingStrategy.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/MedianOf3PivotingStrategy.java
index fedeb09b0..30fbc43a8 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/MedianOf3PivotingStrategy.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/MedianOf3PivotingStrategy.java
@@ -16,18 +16,13 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.core.MathArrays;
/**
* Classic median of 3 strategy given begin and end indices.
* @since 3.4
*/
-public class MedianOf3PivotingStrategy implements PivotingStrategy, Serializable {
- /** Serializable UID. */
- private static final long serialVersionUID = 20140713L;
-
+public class MedianOf3PivotingStrategy implements PivotingStrategy {
/**{@inheritDoc}
* This in specific makes use of median of 3 pivoting.
* @return The index corresponding to a pivot chosen between the
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Min.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Min.java
index bebc7078e..8a185c5b2 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Min.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Min.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -37,11 +35,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Min extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Min extends AbstractStorelessUnivariateStatistic {
/**Number of values that have been added. */
private long n;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java
index e6cc453bb..6fbfbc696 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
import java.util.Arrays;
import java.util.BitSet;
@@ -90,10 +89,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Percentile extends AbstractUnivariateStatistic implements Serializable {
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Percentile extends AbstractUnivariateStatistic {
/** Maximum number of partitioning pivots cached (each level double the number of pivots). */
private static final int MAX_CACHED_LEVELS = 10;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/RandomPivotingStrategy.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/RandomPivotingStrategy.java
index bb91ba8de..3551ff125 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/RandomPivotingStrategy.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/RandomPivotingStrategy.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.rank;
-import java.io.Serializable;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
@@ -30,9 +29,7 @@ import org.apache.commons.rng.core.RandomProviderDefaultState;
*
* @since 3.4
*/
-public class RandomPivotingStrategy implements PivotingStrategy, Serializable {
- /** Serializable UID. */
- private static final long serialVersionUID = 20160517L;
+public class RandomPivotingStrategy implements PivotingStrategy {
/** Source of randomness. */
private final RandomSource randomSource;
/** Random generator to use for selecting pivot. */
@@ -66,35 +63,4 @@ public class RandomPivotingStrategy implements PivotingStrategy, Serializable {
MathArrays.verifyValues(work, begin, end - begin);
return begin + random.nextInt(end - begin - 1);
}
-
- /**
- * @param out Output stream.
- * @throws IOException if an error occurs.
- */
- private void writeObject(ObjectOutputStream out)
- throws IOException {
- // Write non-transient fields.
- out.defaultWriteObject();
-
- // Save current state.
- out.writeObject(((RandomProviderDefaultState) random.saveState()).getState());
- }
-
- /**
- * @param in Input stream.
- * @throws IOException if an error occurs.
- * @throws ClassNotFoundException if an error occurs.
- */
- private void readObject(ObjectInputStream in)
- throws IOException,
- ClassNotFoundException {
- // Read non-transient fields.
- in.defaultReadObject();
-
- // Recreate the "delegate" from serialized info.
- random = randomSource.create();
- // And restore its state.
- final RandomProviderDefaultState state = new RandomProviderDefaultState((byte[]) in.readObject());
- random.restoreState(state);
- }
}
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Product.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Product.java
index 570101676..a1ffdf6db 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Product.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Product.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.summary;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -37,11 +35,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Product extends AbstractStorelessUnivariateStatistic implements Serializable, WeightedEvaluation {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Product extends AbstractStorelessUnivariateStatistic implements WeightedEvaluation {
/**The number of values that have been added. */
private long n;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Sum.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Sum.java
index 60e38864e..f98faa0ba 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Sum.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/Sum.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.summary;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -36,11 +34,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class Sum extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class Sum extends AbstractStorelessUnivariateStatistic {
/** */
private long n;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfLogs.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfLogs.java
index fd0e571aa..d56d271da 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfLogs.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfLogs.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.summary;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -44,11 +42,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class SumOfLogs extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class SumOfLogs extends AbstractStorelessUnivariateStatistic {
/** Number of values that have been added. */
private int n;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfSquares.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfSquares.java
index f439b5c8f..7462052e3 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfSquares.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/summary/SumOfSquares.java
@@ -16,8 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.descriptive.summary;
-import java.io.Serializable;
-
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
import org.apache.commons.math4.legacy.exception.NullArgumentException;
import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic;
@@ -35,11 +33,7 @@ import org.apache.commons.math4.legacy.core.MathArrays;
* one of the threads invokes the increment()
or
* clear()
method, it must be synchronized externally.
*/
-public class SumOfSquares extends AbstractStorelessUnivariateStatistic implements Serializable {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = 20150412L;
-
+public class SumOfSquares extends AbstractStorelessUnivariateStatistic {
/** Number of values that have been added. */
private long n;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/RegressionResults.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/RegressionResults.java
index 030c99a69..67cea8d57 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/RegressionResults.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/RegressionResults.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.regression;
-import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math4.legacy.exception.OutOfRangeException;
@@ -27,7 +26,7 @@ import org.apache.commons.math4.core.jdkmath.JdkMath;
*
* @since 3.0
*/
-public class RegressionResults implements Serializable {
+public class RegressionResults {
/** INDEX of Sum of Squared Errors. */
private static final int SSE_IDX = 0;
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/SimpleRegression.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/SimpleRegression.java
index b53bd4f26..f070ca5a7 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/SimpleRegression.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/regression/SimpleRegression.java
@@ -16,7 +16,6 @@
*/
package org.apache.commons.math4.legacy.stat.regression;
-import java.io.Serializable;
import org.apache.commons.statistics.distribution.TDistribution;
import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
@@ -60,11 +59,7 @@ import org.apache.commons.numbers.core.Precision;
*
*
*/
-public class SimpleRegression implements Serializable, UpdatingMultipleLinearRegression {
-
- /** Serializable version identifier. */
- private static final long serialVersionUID = -3004689053607543335L;
-
+public class SimpleRegression implements UpdatingMultipleLinearRegression {
/** sum of x values. */
private double sumX;
diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/FrequencyTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/FrequencyTest.java
index 1365aa388..57a5c5b43 100644
--- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/FrequencyTest.java
+++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/FrequencyTest.java
@@ -194,14 +194,6 @@ public final class FrequencyTest {
}
}
- @Test
- public void testSerial() {
- Frequency