Adding serialversionUID to control versioning and allow for implementations that would like to maintain serialization.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e9bba109ed
commit
45f78a21b9
|
@ -21,9 +21,13 @@ import java.io.Serializable;
|
|||
* Error thrown when a numerical computation can not be performed because the
|
||||
* numerical result failed to converge to a finite value.
|
||||
*
|
||||
* @version $Revision: 1.12 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.13 $ $Date: 2004/06/02 00:05:28 $
|
||||
*/
|
||||
public class ConvergenceException extends MathException implements Serializable{
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -3657394299929217890L;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
|
|
@ -19,9 +19,12 @@ import java.io.Serializable;
|
|||
|
||||
/**
|
||||
* Signals a configuration problem with any of the factory methods.
|
||||
* @version $Revision: 1.16 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:05:28 $
|
||||
*/
|
||||
public class MathConfigurationException extends MathException implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -7958299004965931723L;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
|
|
|
@ -21,10 +21,13 @@ import org.apache.commons.lang.exception.NestableException;
|
|||
|
||||
/**
|
||||
* A generic exception indicating problems in the math package.
|
||||
* @version $Revision: 1.15 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:05:28 $
|
||||
*/
|
||||
public class MathException extends NestableException implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -8594613561393443827L;
|
||||
|
||||
/**
|
||||
* Constructs a MathException
|
||||
*/
|
||||
|
|
|
@ -23,10 +23,13 @@ import org.apache.commons.math.MathException;
|
|||
* Implements the <a href="http://mathworld.wolfram.com/Bisection.html">bisection algorithm</a>
|
||||
* for finding zeros of univariate real functions. This algorithm will find only one zero in the given interval.
|
||||
* The function should be continuous but not necessarily smooth.
|
||||
* @version $Revision: 1.15 $ $Date: 2004/04/27 16:42:33 $
|
||||
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public class BisectionSolver extends UnivariateRealSolverImpl implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 7137520585963699578L;
|
||||
|
||||
/**
|
||||
* Construct a solver for the given function.
|
||||
* @param f function to solve.
|
||||
|
|
|
@ -25,9 +25,13 @@ import org.apache.commons.math.MathException;
|
|||
* functions. This algorithm will find only one zero in the given interval.
|
||||
* The function should be continuous but not necessarily smooth.
|
||||
*
|
||||
* @version $Revision: 1.14 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.15 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public class BrentSolver extends UnivariateRealSolverImpl implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 3350616277306882875L;
|
||||
|
||||
/**
|
||||
* Construct a solver for the given function.
|
||||
* @param f function to solve.
|
||||
|
|
|
@ -26,10 +26,13 @@ import org.apache.commons.math.MathException;
|
|||
* algorithm will find only one zero in the given interval. The function should
|
||||
* be continuous but not necessarily smooth.
|
||||
*
|
||||
* @version $Revision: 1.3 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.4 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public class NewtonSolver extends UnivariateRealSolverImpl implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 2606474895443431607L;
|
||||
|
||||
/** The first derivative of the target function. */
|
||||
private UnivariateRealFunction derivative;
|
||||
|
||||
|
|
|
@ -23,10 +23,13 @@ import java.io.Serializable;
|
|||
* <a href="http://mathworld.wolfram.com/HornersMethod.html">Horner's Method</a>
|
||||
* is used to evaluate the function.
|
||||
*
|
||||
* @version $Revision: 1.9 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.10 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public class PolynomialFunction implements DifferentiableUnivariateRealFunction, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 3322454535052136809L;
|
||||
|
||||
/**
|
||||
* The coefficients of the polynomial, ordered by degree -- i.e., coefficients[0] is the constant term
|
||||
* and coefficients[n] is the coefficient of x^n where n is the degree of the polynomial.
|
||||
|
|
|
@ -41,10 +41,13 @@ import org.apache.commons.math.MathException;
|
|||
* <li> Let <code>j</code> be the index of the largest knot point that is less than or equal to <code>x</code>.
|
||||
* The value returned is <br> <code>polynomials[j](x - knot[j])</code></li></ol>
|
||||
*
|
||||
* @version $Revision: 1.4 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.5 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public class PolynomialSplineFunction implements UnivariateRealFunction, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 7011031166416885789L;
|
||||
|
||||
/** Spline segment interval delimiters (knots). Size is n+1 for n segments. */
|
||||
private double knots[];
|
||||
|
||||
|
|
|
@ -31,9 +31,13 @@ import org.apache.commons.math.MathException;
|
|||
* <p>
|
||||
* The function is supposed to be continuous but not necessarily smooth.
|
||||
*
|
||||
* @version $Revision: 1.14 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.15 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public class SecantSolver extends UnivariateRealSolverImpl implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 1984971194738974867L;
|
||||
|
||||
/**
|
||||
* Construct a solver for the given function.
|
||||
* @param f function to solve.
|
||||
|
|
|
@ -24,11 +24,12 @@ import org.apache.commons.math.MathException;
|
|||
* Provide a default implementation for several functions useful to generic
|
||||
* solvers.
|
||||
*
|
||||
* @version $Revision: 1.12 $ $Date: 2004/04/27 16:42:33 $
|
||||
* @version $Revision: 1.13 $ $Date: 2004/06/02 00:11:08 $
|
||||
*/
|
||||
public abstract class UnivariateRealSolverImpl
|
||||
implements UnivariateRealSolver, Serializable {
|
||||
public abstract class UnivariateRealSolverImpl implements UnivariateRealSolver, Serializable {
|
||||
|
||||
static final long serialVersionUID = 1112491292565386596L;
|
||||
|
||||
/** Maximum absolute error. */
|
||||
protected double absoluteAccuracy;
|
||||
|
||||
|
|
|
@ -23,10 +23,13 @@ import java.io.Serializable;
|
|||
* real and imaginary part.
|
||||
*
|
||||
* @author Apache Software Foundation
|
||||
* @version $Revision: 1.7 $ $Date: 2004/02/29 19:52:01 $
|
||||
* @version $Revision: 1.8 $ $Date: 2004/06/02 00:07:01 $
|
||||
*/
|
||||
public class Complex implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -6530173849413811929L;
|
||||
|
||||
/** The square root of -1. A number representing "0.0 + 1.0i".*/
|
||||
public static final Complex I = new Complex(0.0, 1.0);
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.apache.commons.math.complex;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.NumberFormat;
|
||||
|
@ -28,9 +29,12 @@ import java.text.ParsePosition;
|
|||
* can be configured.
|
||||
*
|
||||
* @author Apache Software Foundation
|
||||
* @version $Revision: 1.7 $ $Date: 2004/06/01 13:47:17 $
|
||||
* @version $Revision: 1.8 $ $Date: 2004/06/02 00:07:01 $
|
||||
*/
|
||||
public class ComplexFormat extends Format {
|
||||
public class ComplexFormat extends Format implements Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -6337346779577272306L;
|
||||
|
||||
/** The default complex format. */
|
||||
private static final ComplexFormat DEFAULT = new ComplexFormat();
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
package org.apache.commons.math.distribution;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.analysis.UnivariateRealFunction;
|
||||
import org.apache.commons.math.analysis.UnivariateRealSolverUtils;
|
||||
|
@ -24,11 +26,13 @@ import org.apache.commons.math.analysis.UnivariateRealSolverUtils;
|
|||
* implementations for some of the methods that do not vary from distribution
|
||||
* to distribution.
|
||||
*
|
||||
* @version $Revision: 1.22 $ $Date: 2004/05/30 01:24:02 $
|
||||
* @version $Revision: 1.23 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public abstract class AbstractContinuousDistribution
|
||||
implements ContinuousDistribution {
|
||||
implements ContinuousDistribution, Serializable {
|
||||
|
||||
static final long serialVersionUID = -38038050983108802L;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
package org.apache.commons.math.distribution;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
|
||||
|
||||
|
@ -23,11 +25,13 @@ import org.apache.commons.math.MathException;
|
|||
* implementations for some of the methods that do not vary from distribution
|
||||
* to distribution.
|
||||
*
|
||||
* @version $Revision: 1.15 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public abstract class AbstractDiscreteDistribution
|
||||
implements DiscreteDistribution {
|
||||
implements DiscreteDistribution, Serializable {
|
||||
|
||||
static final long serialVersionUID = -1146319659338487221L;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
|
|
@ -24,12 +24,15 @@ import org.apache.commons.math.util.MathUtils;
|
|||
/**
|
||||
* The default implementation of {@link BinomialDistribution}.
|
||||
*
|
||||
* @version $Revision: 1.14 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.15 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class BinomialDistributionImpl
|
||||
extends AbstractDiscreteDistribution
|
||||
implements BinomialDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 6751309484392813623L;
|
||||
|
||||
/** The number of trials. */
|
||||
private int numberOfTrials;
|
||||
|
||||
|
|
|
@ -22,12 +22,15 @@ import org.apache.commons.math.MathException;
|
|||
/**
|
||||
* The default implementation of {@link ChiSquaredDistribution}
|
||||
*
|
||||
* @version $Revision: 1.16 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class ChiSquaredDistributionImpl
|
||||
extends AbstractContinuousDistribution
|
||||
implements ChiSquaredDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -8352658048349159782L;
|
||||
|
||||
/** Internal Gamma distribution. */
|
||||
private GammaDistribution gamma;
|
||||
|
||||
|
|
|
@ -22,11 +22,14 @@ import org.apache.commons.math.MathException;
|
|||
/**
|
||||
* The default implementation of {@link ExponentialDistribution}
|
||||
*
|
||||
* @version $Revision: 1.15 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class ExponentialDistributionImpl
|
||||
implements ExponentialDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 2401296428283614780L;
|
||||
|
||||
/** The mean of this distribution. */
|
||||
private double mean;
|
||||
|
||||
|
|
|
@ -24,12 +24,15 @@ import org.apache.commons.math.special.Beta;
|
|||
* Default implementation of
|
||||
* {@link org.apache.commons.math.distribution.FDistribution}.
|
||||
*
|
||||
* @version $Revision: 1.16 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class FDistributionImpl
|
||||
extends AbstractContinuousDistribution
|
||||
implements FDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -8516354193418641566L;
|
||||
|
||||
/** The numerator degrees of freedom*/
|
||||
private double numeratorDegreesOfFreedom;
|
||||
|
||||
|
|
|
@ -23,11 +23,14 @@ import org.apache.commons.math.special.Gamma;
|
|||
/**
|
||||
* The default implementation of {@link GammaDistribution}
|
||||
*
|
||||
* @version $Revision: 1.19 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.20 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class GammaDistributionImpl extends AbstractContinuousDistribution
|
||||
implements GammaDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -3239549463135430361L;
|
||||
|
||||
/** The shape parameter. */
|
||||
private double alpha;
|
||||
|
||||
|
|
|
@ -24,12 +24,15 @@ import org.apache.commons.math.util.MathUtils;
|
|||
/**
|
||||
* The default implementation of {@link HypergeometricDistribution}.
|
||||
*
|
||||
* @version $Revision: 1.13 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.14 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class HypergeometricDistributionImpl extends AbstractDiscreteDistribution
|
||||
implements HypergeometricDistribution, Serializable
|
||||
{
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -436928820673516179L;
|
||||
|
||||
/** The number of successes in the population. */
|
||||
private int numberOfSuccesses;
|
||||
|
||||
|
|
|
@ -25,11 +25,14 @@ import org.apache.commons.math.special.Erf;
|
|||
* Default implementation of
|
||||
* {@link org.apache.commons.math.distribution.NormalDistribution}.
|
||||
*
|
||||
* @version $Revision: 1.10 $ $Date: 2004/05/19 15:06:44 $
|
||||
* @version $Revision: 1.11 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class NormalDistributionImpl extends AbstractContinuousDistribution
|
||||
implements NormalDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 8589540077390120676L;
|
||||
|
||||
/** The mean of this distribution. */
|
||||
private double mean = 0;
|
||||
|
||||
|
|
|
@ -24,12 +24,15 @@ import org.apache.commons.math.special.Beta;
|
|||
* Default implementation of
|
||||
* {@link org.apache.commons.math.distribution.TDistribution}.
|
||||
*
|
||||
* @version $Revision: 1.16 $ $Date: 2004/05/19 14:16:31 $
|
||||
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:15:16 $
|
||||
*/
|
||||
public class TDistributionImpl
|
||||
extends AbstractContinuousDistribution
|
||||
implements TDistribution, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -5852615386664158222L;
|
||||
|
||||
/** The degrees of freedom*/
|
||||
private double degreesOfFreedom;
|
||||
|
||||
|
|
|
@ -22,9 +22,13 @@ import org.apache.commons.lang.exception.NestableRuntimeException;
|
|||
* Thrown when a system attempts an operation on a matrix, and
|
||||
* that matrix does not satisfy the preconditions for the
|
||||
* aforementioned operation.
|
||||
* @version $Revision: 1.4 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.5 $ $Date: 2004/06/02 00:06:18 $
|
||||
*/
|
||||
public class InvalidMatrixException extends NestableRuntimeException {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 5318837237354354107L;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
|
|
@ -21,9 +21,13 @@ import org.apache.commons.lang.exception.NestableRuntimeException;
|
|||
/**
|
||||
* Thrown when an operation addresses a matrix coordinate (row,col)
|
||||
* which is outside of the dimensions of a matrix.
|
||||
* @version $Revision: 1.4 $ $Date: 2004/04/27 04:37:58 $
|
||||
* @version $Revision: 1.5 $ $Date: 2004/06/02 00:06:18 $
|
||||
*/
|
||||
public class MatrixIndexException extends NestableRuntimeException {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = -1341109412864309526L;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
|
|
|
@ -38,10 +38,13 @@ import java.io.Serializable;
|
|||
* explicitly invoke <code>LUDecompose()</code> to recompute the decomposition
|
||||
* before using any of the methods above.
|
||||
*
|
||||
* @version $Revision: 1.20 $ $Date: 2004/05/19 14:16:32 $
|
||||
* @version $Revision: 1.21 $ $Date: 2004/06/02 00:06:18 $
|
||||
*/
|
||||
public class RealMatrixImpl implements RealMatrix, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
static final long serialVersionUID = 4237564493130426188L;
|
||||
|
||||
/** Entries of the matrix */
|
||||
private double data[][] = null;
|
||||
|
||||
|
|
|
@ -32,9 +32,13 @@ import org.apache.commons.math.MathException;
|
|||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @version $Revision: 1.12 $ $Date: 2004/04/26 20:47:07 $
|
||||
* @version $Revision: 1.13 $ $Date: 2004/06/02 00:04:11 $
|
||||
*/
|
||||
public abstract class ContinuedFraction implements Serializable {
|
||||
|
||||
/** Serialization UID */
|
||||
static final long serialVersionUID = 1768555336266158242L;
|
||||
|
||||
/** Maximum allowed numerical error. */
|
||||
private static final double DEFAULT_EPSILON = 10e-9;
|
||||
|
||||
|
|
Loading…
Reference in New Issue