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 a comparable type used in the frequency distribution */ -public class Frequency> implements Serializable { - - /** Serializable version identifier. */ - private static final long serialVersionUID = 605878194679954450L; +public class Frequency> { /** underlying collection. */ private final SortedMap freqTable; @@ -334,11 +330,7 @@ public class Frequency> implements Serializable { * * @param the type of the objects compared */ - private static class NaturalComparator> implements Comparator, Serializable { - - /** Serializable version identifier. */ - private static final long serialVersionUID = -3852193713161395148L; - + private static class NaturalComparator> implements Comparator { /** * Compare the two {@link Comparable Comparable} arguments. * This method is equivalent to: diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/AggregateSummaryStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/AggregateSummaryStatistics.java index bf41749ca..7604bb02c 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/AggregateSummaryStatistics.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/AggregateSummaryStatistics.java @@ -17,7 +17,6 @@ package org.apache.commons.math4.legacy.stat.descriptive; -import java.io.Serializable; import java.util.Collection; import java.util.Iterator; @@ -50,13 +49,7 @@ import org.apache.commons.math4.legacy.exception.NullArgumentException; * @since 2.0 * */ -public class AggregateSummaryStatistics implements StatisticalSummary, - Serializable { - - - /** Serializable version identifier. */ - private static final long serialVersionUID = -8207112444016386906L; - +public class AggregateSummaryStatistics implements StatisticalSummary { /** * A SummaryStatistics serving as a prototype for creating SummaryStatistics. * contributing to this aggregate diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/DescriptiveStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/DescriptiveStatistics.java index b418c3ec2..cf8657450 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/DescriptiveStatistics.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/DescriptiveStatistics.java @@ -16,7 +16,6 @@ */ package org.apache.commons.math4.legacy.stat.descriptive; -import java.io.Serializable; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; @@ -56,7 +55,7 @@ import org.apache.commons.math4.core.jdkmath.JdkMath; * {@link SynchronizedDescriptiveStatistics} if concurrent access from multiple * threads is required. */ -public class DescriptiveStatistics implements StatisticalSummary, Serializable { +public class DescriptiveStatistics implements StatisticalSummary { /** * Represents an infinite window size. When the {@link #getWindowSize()} @@ -65,9 +64,6 @@ public class DescriptiveStatistics implements StatisticalSummary, Serializable { */ public static final int INFINITE_WINDOW = -1; - /** Serialization UID. */ - private static final long serialVersionUID = 4133067267405273064L; - /** Name of the setQuantile method. */ private static final String SET_QUANTILE_METHOD_NAME = "setQuantile"; diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatistics.java index 10a4883e1..b62aa1ccc 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatistics.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatistics.java @@ -16,7 +16,6 @@ */ package org.apache.commons.math4.legacy.stat.descriptive; -import java.io.Serializable; import java.util.Arrays; import org.apache.commons.math4.legacy.exception.DimensionMismatchException; @@ -68,11 +67,7 @@ import org.apache.commons.numbers.core.Precision; * @since 1.2 */ public class MultivariateSummaryStatistics - implements StatisticalMultivariateSummary, Serializable { - - /** Serialization UID. */ - private static final long serialVersionUID = 2271900808994826718L; - + implements StatisticalMultivariateSummary { /** Dimension of the data. */ private final int k; diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/ResizableDoubleArray.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/ResizableDoubleArray.java index 5f5c2a95c..9c35c4d6c 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/ResizableDoubleArray.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/ResizableDoubleArray.java @@ -16,7 +16,6 @@ */ package org.apache.commons.math4.legacy.stat.descriptive; -import java.io.Serializable; import java.util.Arrays; import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException; @@ -75,10 +74,7 @@ import org.apache.commons.math4.legacy.core.MathArrays; *

* 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. *

*/ -public class SummaryStatistics implements StatisticalSummary, Serializable { - - /** Serialization UID. */ - private static final long serialVersionUID = -2021321786743555871L; - +public class SummaryStatistics implements StatisticalSummary { /** count 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/SynchronizedDescriptiveStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedDescriptiveStatistics.java index 8d5618ce4..0fc06af95 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedDescriptiveStatistics.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedDescriptiveStatistics.java @@ -32,10 +32,6 @@ import org.apache.commons.math4.legacy.exception.NullArgumentException; * @since 1.2 */ public class SynchronizedDescriptiveStatistics extends DescriptiveStatistics { - - /** Serialization UID. */ - private static final long serialVersionUID = 1L; - /** * Construct an instance with infinite window. */ diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedMultivariateSummaryStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedMultivariateSummaryStatistics.java index 65af993dc..49394ce15 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedMultivariateSummaryStatistics.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedMultivariateSummaryStatistics.java @@ -33,10 +33,6 @@ import org.apache.commons.math4.legacy.linear.RealMatrix; */ public class SynchronizedMultivariateSummaryStatistics extends MultivariateSummaryStatistics { - - /** Serialization UID. */ - private static final long serialVersionUID = 7099834153347155363L; - /** * Construct a SynchronizedMultivariateSummaryStatistics instance. * @param k dimension of the data diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedSummaryStatistics.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedSummaryStatistics.java index a73634551..008a3e118 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedSummaryStatistics.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedSummaryStatistics.java @@ -32,10 +32,6 @@ import org.apache.commons.math4.legacy.exception.NullArgumentException; * @since 1.2 */ public class SynchronizedSummaryStatistics extends SummaryStatistics { - - /** Serialization UID. */ - private static final long serialVersionUID = 1909861009042253704L; - /** * Construct a SynchronizedSummaryStatistics instance. */ diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FirstMoment.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FirstMoment.java index 2d08961bc..f97e7c9d3 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FirstMoment.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FirstMoment.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; import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivariateStatistic; @@ -45,12 +43,7 @@ import org.apache.commons.math4.legacy.stat.descriptive.AbstractStorelessUnivari * one of the threads invokes the increment() or * clear() method, it must be synchronized externally.

*/ -class FirstMoment extends AbstractStorelessUnivariateStatistic - implements Serializable { - - /** Serializable version identifier. */ - private static final long serialVersionUID = 20150412L; - +class FirstMoment extends AbstractStorelessUnivariateStatistic { /** Count of values that have been added. */ protected long n; diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FourthMoment.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FourthMoment.java index a7de37305..5a47fd49b 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FourthMoment.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/moment/FourthMoment.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; /** @@ -52,11 +50,7 @@ import org.apache.commons.math4.legacy.exception.NullArgumentException; * one of the threads invokes the 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 f = new Frequency<>(); - f.addValue(ONE); - f.addValue(TWO); - Assert.assertEquals(f, TestUtils.serializeAndRecover(f)); - } - @Test public void testGetUniqueCount() { Frequency f = new Frequency<>(); diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatisticsTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatisticsTest.java index 0c2a86b9e..ed169472b 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatisticsTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/MultivariateSummaryStatisticsTest.java @@ -255,28 +255,6 @@ public class MultivariateSummaryStatisticsTest { } - @Test - public void testSerialization() { - MultivariateSummaryStatistics u = createMultivariateSummaryStatistics(2, true); - // Empty test - TestUtils.checkSerializedEquality(u); - MultivariateSummaryStatistics s = (MultivariateSummaryStatistics) TestUtils.serializeAndRecover(u); - Assert.assertEquals(u, s); - - // Add some data - u.addValue(new double[] { 2d, 1d }); - u.addValue(new double[] { 1d, 1d }); - u.addValue(new double[] { 3d, 1d }); - u.addValue(new double[] { 4d, 1d }); - u.addValue(new double[] { 5d, 1d }); - - // Test again - TestUtils.checkSerializedEquality(u); - s = (MultivariateSummaryStatistics) TestUtils.serializeAndRecover(u); - Assert.assertEquals(u, s); - - } - @Test public void testEqualsAndHashCode() { MultivariateSummaryStatistics u = createMultivariateSummaryStatistics(2, true); diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValuesTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValuesTest.java index 8c7d848e1..bddb0bb11 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValuesTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/StatisticalSummaryValuesTest.java @@ -29,14 +29,6 @@ import org.junit.Test; public final class StatisticalSummaryValuesTest { - @Test - public void testSerialization() { - StatisticalSummaryValues u = new StatisticalSummaryValues(1, 2, 3, 4, 5, 6); - TestUtils.checkSerializedEquality(u); - StatisticalSummaryValues t = (StatisticalSummaryValues) TestUtils.serializeAndRecover(u); - verifyEquality(u, t); - } - @Test public void testEqualsAndHashCode() { StatisticalSummaryValues u = new StatisticalSummaryValues(1, 2, 3, 4, 5, 6); diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatisticsTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatisticsTest.java index 77a60fc11..a93535ffd 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatisticsTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/SummaryStatisticsTest.java @@ -155,30 +155,6 @@ public class SummaryStatisticsTest { verifySummary(u, summary); } - @Test - public void testSerialization() { - SummaryStatistics u = createSummaryStatistics(); - // Empty test - TestUtils.checkSerializedEquality(u); - SummaryStatistics s = (SummaryStatistics) TestUtils.serializeAndRecover(u); - StatisticalSummary summary = s.getSummary(); - verifySummary(u, summary); - - // Add some data - u.addValue(2d); - u.addValue(1d); - u.addValue(3d); - u.addValue(4d); - u.addValue(5d); - - // Test again - TestUtils.checkSerializedEquality(u); - s = (SummaryStatistics) TestUtils.serializeAndRecover(u); - summary = s.getSummary(); - verifySummary(u, summary); - - } - @Test public void testEqualsAndHashCode() { SummaryStatistics u = createSummaryStatistics(); diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovarianceTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovarianceTest.java index 3553cf370..5791d88b8 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovarianceTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialCovarianceTest.java @@ -82,10 +82,4 @@ public class VectorialCovarianceTest { } } - - @Test - public void testSerial(){ - VectorialCovariance stat = new VectorialCovariance(points[0].length, true); - Assert.assertEquals(stat, TestUtils.serializeAndRecover(stat)); - } } diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMeanTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMeanTest.java index aa6038300..c81304e77 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMeanTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/moment/VectorialMeanTest.java @@ -74,13 +74,4 @@ public class VectorialMeanTest { } } - - @Test - public void testSerial() { - VectorialMean stat = new VectorialMean(points[0].length); - for (int i = 0; i < points.length; ++i) { - stat.increment(points[i]); - } - Assert.assertEquals(stat, TestUtils.serializeAndRecover(stat)); - } }