tighten rules for public/private/abstract/final/... modifiers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@811786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d485dca2ce
commit
54c0e73219
|
@ -112,12 +112,14 @@
|
|||
<property name="message" value="developers names should be in pom file"/>
|
||||
</module>
|
||||
|
||||
<!-- Use a consistent way to put modifiers -->
|
||||
<module name="RedundantModifier" />
|
||||
<module name="ModifierOrder" />
|
||||
|
||||
<!--
|
||||
<module name="DeclarationOrder" />
|
||||
<module name="IllegalCatch" />
|
||||
<module name="RedundantModifier" />
|
||||
<module name="StringLiteralEquality" />
|
||||
<module name="ModifierOrder" />
|
||||
<module name="MultipleStringLiterals" />
|
||||
<module name="MultipleVariableDeclarations" />
|
||||
<module name="TodoComment" />
|
||||
|
|
|
@ -41,14 +41,14 @@ public interface ConvergingAlgorithm {
|
|||
*
|
||||
* @param count maximum number of iterations
|
||||
*/
|
||||
public abstract void setMaximalIterationCount(int count);
|
||||
void setMaximalIterationCount(int count);
|
||||
|
||||
/**
|
||||
* Get the upper limit for the number of iterations.
|
||||
*
|
||||
* @return the actual upper limit
|
||||
*/
|
||||
public abstract int getMaximalIterationCount();
|
||||
int getMaximalIterationCount();
|
||||
|
||||
/**
|
||||
* Reset the upper limit for the number of iterations to the default.
|
||||
|
@ -57,7 +57,7 @@ public interface ConvergingAlgorithm {
|
|||
*
|
||||
* @see #setMaximalIterationCount(int)
|
||||
*/
|
||||
public abstract void resetMaximalIterationCount();
|
||||
void resetMaximalIterationCount();
|
||||
|
||||
/**
|
||||
* Set the absolute accuracy.
|
||||
|
@ -74,21 +74,21 @@ public interface ConvergingAlgorithm {
|
|||
* @throws IllegalArgumentException if the accuracy can't be achieved by
|
||||
* the solver or is otherwise deemed unreasonable.
|
||||
*/
|
||||
public abstract void setAbsoluteAccuracy(double accuracy);
|
||||
void setAbsoluteAccuracy(double accuracy);
|
||||
|
||||
/**
|
||||
* Get the actual absolute accuracy.
|
||||
*
|
||||
* @return the accuracy
|
||||
*/
|
||||
public abstract double getAbsoluteAccuracy();
|
||||
double getAbsoluteAccuracy();
|
||||
|
||||
/**
|
||||
* Reset the absolute accuracy to the default.
|
||||
* <p>
|
||||
* The default value is provided by the algorithm implementation.</p>
|
||||
*/
|
||||
public abstract void resetAbsoluteAccuracy();
|
||||
void resetAbsoluteAccuracy();
|
||||
|
||||
/**
|
||||
* Set the relative accuracy.
|
||||
|
@ -104,19 +104,19 @@ public interface ConvergingAlgorithm {
|
|||
* @throws IllegalArgumentException if the accuracy can't be achieved by
|
||||
* the algorithm or is otherwise deemed unreasonable.
|
||||
*/
|
||||
public abstract void setRelativeAccuracy(double accuracy);
|
||||
void setRelativeAccuracy(double accuracy);
|
||||
|
||||
/**
|
||||
* Get the actual relative accuracy.
|
||||
* @return the accuracy
|
||||
*/
|
||||
public abstract double getRelativeAccuracy();
|
||||
double getRelativeAccuracy();
|
||||
|
||||
/**
|
||||
* Reset the relative accuracy to the default.
|
||||
* The default value is provided by the algorithm implementation.
|
||||
*/
|
||||
public abstract void resetRelativeAccuracy();
|
||||
void resetRelativeAccuracy();
|
||||
|
||||
/**
|
||||
* Get the number of iterations in the last run of the algorithm.
|
||||
|
@ -131,6 +131,6 @@ public interface ConvergingAlgorithm {
|
|||
* @throws IllegalStateException if there is no result available, either
|
||||
* because no result was yet computed or the last attempt failed.
|
||||
*/
|
||||
public abstract int getIterationCount();
|
||||
int getIterationCount();
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,6 @@ public interface DifferentiableUnivariateMatrixFunction
|
|||
*
|
||||
* @return the derivative function
|
||||
*/
|
||||
public UnivariateMatrixFunction derivative();
|
||||
UnivariateMatrixFunction derivative();
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,6 @@ public interface DifferentiableUnivariateRealFunction
|
|||
*
|
||||
* @return the derivative function
|
||||
*/
|
||||
public UnivariateRealFunction derivative();
|
||||
UnivariateRealFunction derivative();
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,6 @@ public interface DifferentiableUnivariateVectorialFunction
|
|||
*
|
||||
* @return the derivative function
|
||||
*/
|
||||
public UnivariateVectorialFunction derivative();
|
||||
UnivariateVectorialFunction derivative();
|
||||
|
||||
}
|
||||
|
|
|
@ -25,12 +25,13 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @since 2.0
|
||||
*/
|
||||
public interface UnivariateMatrixFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
* @return the value
|
||||
* @throws FunctionEvaluationException if the function evaluation fails
|
||||
*/
|
||||
public double[][] value(double x) throws FunctionEvaluationException;
|
||||
double[][] value(double x) throws FunctionEvaluationException;
|
||||
|
||||
}
|
||||
|
|
|
@ -24,12 +24,13 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface UnivariateRealFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
* @return the value
|
||||
* @throws FunctionEvaluationException if the function evaluation fails
|
||||
*/
|
||||
public double value(double x) throws FunctionEvaluationException;
|
||||
double value(double x) throws FunctionEvaluationException;
|
||||
|
||||
}
|
||||
|
|
|
@ -25,12 +25,13 @@ import org.apache.commons.math.FunctionEvaluationException;
|
|||
* @since 2.0
|
||||
*/
|
||||
public interface UnivariateVectorialFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
* @return the value
|
||||
* @throws FunctionEvaluationException if the function evaluation fails
|
||||
*/
|
||||
public double[] value(double x) throws FunctionEvaluationException;
|
||||
double[] value(double x) throws FunctionEvaluationException;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,6 +34,6 @@ public interface UnivariateRealInterpolator {
|
|||
* @throws MathException if arguments violate assumptions made by the
|
||||
* interpolationg algorithm
|
||||
*/
|
||||
public UnivariateRealFunction interpolate(double xval[], double yval[])
|
||||
UnivariateRealFunction interpolate(double xval[], double yval[])
|
||||
throws MathException;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public abstract class AbstractIntegerDistribution extends AbstractDistribution
|
|||
* @throws MathException if the cumulative probability can not be
|
||||
* computed due to convergence or other numerical errors.
|
||||
*/
|
||||
abstract public double cumulativeProbability(int x) throws MathException;
|
||||
public abstract double cumulativeProbability(int x) throws MathException;
|
||||
|
||||
/**
|
||||
* For a random variable X whose values are distributed according
|
||||
|
|
|
@ -31,39 +31,41 @@ package org.apache.commons.math.distribution;
|
|||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface HypergeometricDistribution extends IntegerDistribution {
|
||||
|
||||
/**
|
||||
* Access the number of successes.
|
||||
* @return the number of successes.
|
||||
*/
|
||||
public abstract int getNumberOfSuccesses();
|
||||
int getNumberOfSuccesses();
|
||||
|
||||
/**
|
||||
* Access the population size.
|
||||
* @return the population size.
|
||||
*/
|
||||
public abstract int getPopulationSize();
|
||||
int getPopulationSize();
|
||||
|
||||
/**
|
||||
* Access the sample size.
|
||||
* @return the sample size.
|
||||
*/
|
||||
public abstract int getSampleSize();
|
||||
int getSampleSize();
|
||||
|
||||
/**
|
||||
* Modify the number of successes.
|
||||
* @param num the new number of successes.
|
||||
*/
|
||||
public abstract void setNumberOfSuccesses(int num);
|
||||
void setNumberOfSuccesses(int num);
|
||||
|
||||
/**
|
||||
* Modify the population size.
|
||||
* @param size the new population size.
|
||||
*/
|
||||
public abstract void setPopulationSize(int size);
|
||||
void setPopulationSize(int size);
|
||||
|
||||
/**
|
||||
* Modify the sample size.
|
||||
* @param size the new sample size.
|
||||
*/
|
||||
public abstract void setSampleSize(int size);
|
||||
void setSampleSize(int size);
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public interface PoissonDistribution extends IntegerDistribution {
|
|||
*
|
||||
* @return the mean for the distribution.
|
||||
*/
|
||||
public double getMean();
|
||||
double getMean();
|
||||
|
||||
/**
|
||||
* Set the mean for the distribution.
|
||||
|
@ -48,7 +48,7 @@ public interface PoissonDistribution extends IntegerDistribution {
|
|||
* @param p the mean
|
||||
* @throws IllegalArgumentException if p ≤ 0
|
||||
*/
|
||||
public void setMean(double p);
|
||||
void setMean(double p);
|
||||
|
||||
/**
|
||||
* Calculates the Poisson distribution function using a normal approximation.
|
||||
|
@ -57,5 +57,6 @@ public interface PoissonDistribution extends IntegerDistribution {
|
|||
* @return the distribution function value calculated using a normal approximation
|
||||
* @throws MathException if an error occurs computing the normal approximation
|
||||
*/
|
||||
public double normalApproximateProbability(int x) throws MathException;
|
||||
double normalApproximateProbability(int x) throws MathException;
|
||||
|
||||
}
|
||||
|
|
|
@ -30,12 +30,13 @@ package org.apache.commons.math.distribution;
|
|||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface ZipfDistribution extends IntegerDistribution {
|
||||
|
||||
/**
|
||||
* Get the number of elements (e.g. corpus size) for the distribution.
|
||||
*
|
||||
* @return the number of elements
|
||||
*/
|
||||
public int getNumberOfElements();
|
||||
int getNumberOfElements();
|
||||
|
||||
/**
|
||||
* Set the number of elements (e.g. corpus size) for the distribution.
|
||||
|
@ -45,14 +46,14 @@ public interface ZipfDistribution extends IntegerDistribution {
|
|||
* @param n the number of elements
|
||||
* @throws IllegalArgumentException if n ≤ 0
|
||||
*/
|
||||
public void setNumberOfElements(int n);
|
||||
void setNumberOfElements(int n);
|
||||
|
||||
/**
|
||||
* Get the exponent characterising the distribution.
|
||||
*
|
||||
* @return the exponent
|
||||
*/
|
||||
public double getExponent();
|
||||
double getExponent();
|
||||
|
||||
/**
|
||||
* Set the exponent characterising the distribution.
|
||||
|
@ -62,5 +63,6 @@ public interface ZipfDistribution extends IntegerDistribution {
|
|||
* @param s the exponent
|
||||
* @throws IllegalArgumentException if s ≤ 0.0
|
||||
*/
|
||||
public void setExponent(double s);
|
||||
void setExponent(double s);
|
||||
|
||||
}
|
||||
|
|
|
@ -46,22 +46,23 @@ package org.apache.commons.math.estimation;
|
|||
*/
|
||||
@Deprecated
|
||||
public interface EstimationProblem {
|
||||
/**
|
||||
* Get the measurements of an estimation problem.
|
||||
* @return measurements
|
||||
*/
|
||||
public WeightedMeasurement[] getMeasurements();
|
||||
|
||||
/**
|
||||
* Get the unbound parameters of the problem.
|
||||
* @return unbound parameters
|
||||
*/
|
||||
public EstimatedParameter[] getUnboundParameters();
|
||||
/**
|
||||
* Get the measurements of an estimation problem.
|
||||
* @return measurements
|
||||
*/
|
||||
WeightedMeasurement[] getMeasurements();
|
||||
|
||||
/**
|
||||
* Get all the parameters of the problem.
|
||||
* @return parameters
|
||||
*/
|
||||
public EstimatedParameter[] getAllParameters();
|
||||
/**
|
||||
* Get the unbound parameters of the problem.
|
||||
* @return unbound parameters
|
||||
*/
|
||||
EstimatedParameter[] getUnboundParameters();
|
||||
|
||||
/**
|
||||
* Get all the parameters of the problem.
|
||||
* @return parameters
|
||||
*/
|
||||
EstimatedParameter[] getAllParameters();
|
||||
|
||||
}
|
||||
|
|
|
@ -53,8 +53,7 @@ public interface Estimator {
|
|||
* @exception EstimationException if the problem cannot be solved
|
||||
*
|
||||
*/
|
||||
public void estimate(EstimationProblem problem)
|
||||
throws EstimationException;
|
||||
void estimate(EstimationProblem problem) throws EstimationException;
|
||||
|
||||
/**
|
||||
* Get the Root Mean Square value.
|
||||
|
@ -68,7 +67,7 @@ public interface Estimator {
|
|||
* @param problem estimation problem
|
||||
* @return RMS value
|
||||
*/
|
||||
public double getRMS(EstimationProblem problem);
|
||||
double getRMS(EstimationProblem problem);
|
||||
|
||||
/**
|
||||
* Get the covariance matrix of estimated parameters.
|
||||
|
@ -77,8 +76,7 @@ public interface Estimator {
|
|||
* @exception EstimationException if the covariance matrix
|
||||
* cannot be computed (singular problem)
|
||||
*/
|
||||
public double[][] getCovariances(EstimationProblem problem)
|
||||
throws EstimationException;
|
||||
double[][] getCovariances(EstimationProblem problem) throws EstimationException;
|
||||
|
||||
/**
|
||||
* Guess the errors in estimated parameters.
|
||||
|
@ -87,7 +85,6 @@ public interface Estimator {
|
|||
* @return errors in estimated parameters
|
||||
* @exception EstimationException if the error cannot be guessed
|
||||
*/
|
||||
public double[] guessParametersErrors(EstimationProblem problem)
|
||||
throws EstimationException;
|
||||
double[] guessParametersErrors(EstimationProblem problem) throws EstimationException;
|
||||
|
||||
}
|
||||
|
|
|
@ -23,11 +23,13 @@ package org.apache.commons.math.genetics;
|
|||
* @since 2.0
|
||||
*/
|
||||
public interface Fitness {
|
||||
|
||||
/**
|
||||
* Compute the fitness. This is usually very time-consuming, so the value
|
||||
* should be cached.
|
||||
*
|
||||
* @return fitness
|
||||
*/
|
||||
public double fitness();
|
||||
double fitness();
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class GeneticAlgorithm {
|
|||
*
|
||||
* @param random random generator
|
||||
*/
|
||||
public synchronized static void setRandomGenerator(RandomGenerator random) {
|
||||
public static synchronized void setRandomGenerator(RandomGenerator random) {
|
||||
randomGenerator = random;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class GeneticAlgorithm {
|
|||
*
|
||||
* @return the static random generator shared by GA implementation classes
|
||||
*/
|
||||
public synchronized static RandomGenerator getRandomGenerator() {
|
||||
public static synchronized RandomGenerator getRandomGenerator() {
|
||||
return randomGenerator;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,6 @@ public interface PermutationChromosome<T> {
|
|||
* @return permutation of <code>sequence</code> represented by this
|
||||
* permutation
|
||||
*/
|
||||
public List<T> decode(List<T> sequence);
|
||||
List<T> decode(List<T> sequence);
|
||||
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public interface BigMatrix extends AnyMatrix {
|
|||
* @throws IllegalArgumentException
|
||||
* if rowDimension(this) != columnDimension(m)
|
||||
*/
|
||||
public BigMatrix preMultiply(BigMatrix m) throws IllegalArgumentException;
|
||||
BigMatrix preMultiply(BigMatrix m) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Returns matrix entries as a two-dimensional array.
|
||||
|
|
|
@ -108,7 +108,7 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @throws IllegalArgumentException
|
||||
* if rowDimension(this) != columnDimension(m)
|
||||
*/
|
||||
public FieldMatrix<T> preMultiply(FieldMatrix<T> m) throws IllegalArgumentException;
|
||||
FieldMatrix<T> preMultiply(FieldMatrix<T> m) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Returns matrix entries as a two-dimensional array.
|
||||
|
|
|
@ -172,8 +172,7 @@ public interface FieldVector<T extends FieldElement<T>> {
|
|||
* @return a vector containing this[i] * v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public FieldVector<T> ebeMultiply(FieldVector<T> v)
|
||||
throws IllegalArgumentException;
|
||||
FieldVector<T> ebeMultiply(FieldVector<T> v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Element-by-element multiplication.
|
||||
|
@ -181,8 +180,7 @@ public interface FieldVector<T extends FieldElement<T>> {
|
|||
* @return a vector containing this[i] * v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public FieldVector<T> ebeMultiply(T[] v)
|
||||
throws IllegalArgumentException;
|
||||
FieldVector<T> ebeMultiply(T[] v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Element-by-element division.
|
||||
|
@ -190,8 +188,7 @@ public interface FieldVector<T extends FieldElement<T>> {
|
|||
* @return a vector containing this[i] / v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public FieldVector<T> ebeDivide(FieldVector<T> v)
|
||||
throws IllegalArgumentException;
|
||||
FieldVector<T> ebeDivide(FieldVector<T> v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Element-by-element division.
|
||||
|
@ -199,8 +196,7 @@ public interface FieldVector<T extends FieldElement<T>> {
|
|||
* @return a vector containing this[i] / v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public FieldVector<T> ebeDivide(T[] v)
|
||||
throws IllegalArgumentException;
|
||||
FieldVector<T> ebeDivide(T[] v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Returns vector entries as a T array.
|
||||
|
|
|
@ -98,7 +98,7 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @throws IllegalArgumentException
|
||||
* if rowDimension(this) != columnDimension(m)
|
||||
*/
|
||||
public RealMatrix preMultiply(RealMatrix m) throws IllegalArgumentException;
|
||||
RealMatrix preMultiply(RealMatrix m) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Returns matrix entries as a two-dimensional array.
|
||||
|
|
|
@ -463,8 +463,7 @@ public interface RealVector {
|
|||
* @return a vector containing this[i] * v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public RealVector ebeMultiply(RealVector v)
|
||||
throws IllegalArgumentException;
|
||||
RealVector ebeMultiply(RealVector v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Element-by-element multiplication.
|
||||
|
@ -472,8 +471,7 @@ public interface RealVector {
|
|||
* @return a vector containing this[i] * v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public RealVector ebeMultiply(double[] v)
|
||||
throws IllegalArgumentException;
|
||||
RealVector ebeMultiply(double[] v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Element-by-element division.
|
||||
|
@ -481,8 +479,7 @@ public interface RealVector {
|
|||
* @return a vector containing this[i] / v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public RealVector ebeDivide(RealVector v)
|
||||
throws IllegalArgumentException;
|
||||
RealVector ebeDivide(RealVector v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Element-by-element division.
|
||||
|
@ -490,8 +487,7 @@ public interface RealVector {
|
|||
* @return a vector containing this[i] / v[i] for all i
|
||||
* @throws IllegalArgumentException if v is not the same size as this
|
||||
*/
|
||||
public RealVector ebeDivide(double[] v)
|
||||
throws IllegalArgumentException;
|
||||
RealVector ebeDivide(double[] v) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Returns vector entries as a double array.
|
||||
|
@ -790,7 +786,7 @@ public interface RealVector {
|
|||
* Returns true if any coordinate of this vector is NaN; false otherwise
|
||||
* @return true if any coordinate of this vector is NaN; false otherwise
|
||||
*/
|
||||
public boolean isNaN();
|
||||
boolean isNaN();
|
||||
|
||||
/**
|
||||
* Returns true if any coordinate of this vector is infinite and none are NaN;
|
||||
|
@ -798,6 +794,6 @@ public interface RealVector {
|
|||
* @return true if any coordinate of this vector is infinite and none are NaN;
|
||||
* false otherwise
|
||||
*/
|
||||
public boolean isInfinite();
|
||||
boolean isInfinite();
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public interface FirstOrderDifferentialEquations {
|
|||
/** Get the dimension of the problem.
|
||||
* @return dimension of the problem
|
||||
*/
|
||||
public int getDimension();
|
||||
int getDimension();
|
||||
|
||||
/** Get the current time derivative of the state vector.
|
||||
* @param t current value of the independent <I>time</I> variable
|
||||
|
@ -59,7 +59,6 @@ public interface FirstOrderDifferentialEquations {
|
|||
* @throws DerivativeException this exception is propagated to the caller if the
|
||||
* underlying user function triggers one
|
||||
*/
|
||||
public void computeDerivatives(double t, double[] y, double[] yDot)
|
||||
throws DerivativeException;
|
||||
void computeDerivatives(double t, double[] y, double[] yDot) throws DerivativeException;
|
||||
|
||||
}
|
||||
|
|
|
@ -53,9 +53,8 @@ public interface FirstOrderIntegrator extends ODEIntegrator {
|
|||
* @throws DerivativeException this exception is propagated to the caller if
|
||||
* the underlying user function triggers one
|
||||
*/
|
||||
public double integrate (FirstOrderDifferentialEquations equations,
|
||||
double t0, double[] y0,
|
||||
double t, double[] y)
|
||||
throws DerivativeException, IntegratorException;
|
||||
double integrate (FirstOrderDifferentialEquations equations,
|
||||
double t0, double[] y0,
|
||||
double t, double[] y) throws DerivativeException, IntegratorException;
|
||||
|
||||
}
|
||||
|
|
|
@ -46,23 +46,22 @@ package org.apache.commons.math.ode;
|
|||
|
||||
public interface SecondOrderDifferentialEquations {
|
||||
|
||||
/** Get the dimension of the problem.
|
||||
* @return dimension of the problem
|
||||
*/
|
||||
public int getDimension();
|
||||
/** Get the dimension of the problem.
|
||||
* @return dimension of the problem
|
||||
*/
|
||||
int getDimension();
|
||||
|
||||
/** Get the current time derivative of the state vector.
|
||||
* @param t current value of the independent <I>time</I> variable
|
||||
* @param y array containing the current value of the state vector
|
||||
* @param yDot array containing the current value of the first derivative
|
||||
* of the state vector
|
||||
* @param yDDot placeholder array where to put the second time derivative
|
||||
* of the state vector
|
||||
* @throws DerivativeException this exception is propagated to the caller if the
|
||||
* underlying user function triggers one
|
||||
*/
|
||||
public void computeSecondDerivatives(double t, double[] y, double[] yDot,
|
||||
double[] yDDot)
|
||||
throws DerivativeException;
|
||||
/** Get the current time derivative of the state vector.
|
||||
* @param t current value of the independent <I>time</I> variable
|
||||
* @param y array containing the current value of the state vector
|
||||
* @param yDot array containing the current value of the first derivative
|
||||
* of the state vector
|
||||
* @param yDDot placeholder array where to put the second time derivative
|
||||
* of the state vector
|
||||
* @throws DerivativeException this exception is propagated to the caller if the
|
||||
* underlying user function triggers one
|
||||
*/
|
||||
void computeSecondDerivatives(double t, double[] y, double[] yDot,
|
||||
double[] yDDot) throws DerivativeException;
|
||||
|
||||
}
|
||||
|
|
|
@ -50,9 +50,9 @@ public interface SecondOrderIntegrator extends ODEIntegrator {
|
|||
* @throws DerivativeException this exception is propagated to the caller if the
|
||||
* underlying user function triggers one
|
||||
*/
|
||||
public void integrate(SecondOrderDifferentialEquations equations,
|
||||
double t0, double[] y0, double[] yDot0,
|
||||
double t, double[] y, double[] yDot)
|
||||
throws DerivativeException, IntegratorException;
|
||||
void integrate(SecondOrderDifferentialEquations equations,
|
||||
double t0, double[] y0, double[] yDot0,
|
||||
double t, double[] y, double[] yDot)
|
||||
throws DerivativeException, IntegratorException;
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public interface EventHandler {
|
|||
* #eventOccurred eventOccurred} method when the integration should be
|
||||
* stopped after the event ending the current step.</p>
|
||||
*/
|
||||
public static final int STOP = 0;
|
||||
int STOP = 0;
|
||||
|
||||
/** Reset state indicator.
|
||||
* <p>This value should be used as the return value of the {@link
|
||||
|
@ -63,7 +63,7 @@ public interface EventHandler {
|
|||
* vector (which will be retrieved thanks to the {@link #resetState
|
||||
* resetState} method).</p>
|
||||
*/
|
||||
public static final int RESET_STATE = 1;
|
||||
int RESET_STATE = 1;
|
||||
|
||||
/** Reset derivatives indicator.
|
||||
* <p>This value should be used as the return value of the {@link
|
||||
|
@ -73,14 +73,14 @@ public interface EventHandler {
|
|||
* org.apache.commons.math.ode.FirstOrderDifferentialEquations#computeDerivatives}
|
||||
* method).</p>
|
||||
*/
|
||||
public static final int RESET_DERIVATIVES = 2;
|
||||
int RESET_DERIVATIVES = 2;
|
||||
|
||||
/** Continue indicator.
|
||||
* <p>This value should be used as the return value of the {@link
|
||||
* #eventOccurred eventOccurred} method when the integration should go
|
||||
* on after the event ending the current step.</p>
|
||||
*/
|
||||
public static final int CONTINUE = 3;
|
||||
int CONTINUE = 3;
|
||||
|
||||
/** Compute the value of the switching function.
|
||||
|
||||
|
@ -96,7 +96,7 @@ public interface EventHandler {
|
|||
* @return value of the g switching function
|
||||
* @exception EventException if the switching function cannot be evaluated
|
||||
*/
|
||||
public double g(double t, double[] y) throws EventException;
|
||||
double g(double t, double[] y) throws EventException;
|
||||
|
||||
/** Handle an event and choose what to do next.
|
||||
|
||||
|
@ -136,7 +136,7 @@ public interface EventHandler {
|
|||
* {@link #RESET_DERIVATIVES} or {@link #CONTINUE}
|
||||
* @exception EventException if the event occurrence triggers an error
|
||||
*/
|
||||
public int eventOccurred(double t, double[] y, boolean increasing) throws EventException;
|
||||
int eventOccurred(double t, double[] y, boolean increasing) throws EventException;
|
||||
|
||||
/** Reset the state prior to continue the integration.
|
||||
|
||||
|
@ -154,6 +154,6 @@ public interface EventHandler {
|
|||
* the new state should be put in the same array
|
||||
* @exception EventException if the state cannot be reseted
|
||||
*/
|
||||
public void resetState(double t, double[] y) throws EventException;
|
||||
void resetState(double t, double[] y) throws EventException;
|
||||
|
||||
}
|
||||
|
|
|
@ -57,7 +57,6 @@ public interface FixedStepHandler {
|
|||
* @param isLast true if the step is the last one
|
||||
* @throws DerivativeException if some error condition is encountered
|
||||
*/
|
||||
public void handleStep(double t, double[] y, double[] yDot, boolean isLast)
|
||||
throws DerivativeException;
|
||||
void handleStep(double t, double[] y, double[] yDot, boolean isLast) throws DerivativeException;
|
||||
|
||||
}
|
||||
|
|
|
@ -49,13 +49,13 @@ public interface StepHandler {
|
|||
* than a custom interpolator.</p>
|
||||
* @return true if the handler needs dense output
|
||||
*/
|
||||
public boolean requiresDenseOutput();
|
||||
boolean requiresDenseOutput();
|
||||
|
||||
/** Reset the step handler.
|
||||
* Initialize the internal data as required before the first step is
|
||||
* handled.
|
||||
*/
|
||||
public void reset();
|
||||
void reset();
|
||||
|
||||
/**
|
||||
* Handle the last accepted step
|
||||
|
@ -73,7 +73,6 @@ public interface StepHandler {
|
|||
* @throws DerivativeException this exception is propagated to the
|
||||
* caller if the underlying user function triggers one
|
||||
*/
|
||||
public void handleStep(StepInterpolator interpolator, boolean isLast)
|
||||
throws DerivativeException;
|
||||
void handleStep(StepInterpolator interpolator, boolean isLast) throws DerivativeException;
|
||||
|
||||
}
|
||||
|
|
|
@ -46,20 +46,19 @@ import org.apache.commons.math.ode.DerivativeException;
|
|||
* @since 1.2
|
||||
*/
|
||||
|
||||
public interface StepInterpolator
|
||||
extends Externalizable {
|
||||
public interface StepInterpolator extends Externalizable {
|
||||
|
||||
/**
|
||||
* Get the previous grid point time.
|
||||
* @return previous grid point time
|
||||
*/
|
||||
public double getPreviousTime();
|
||||
double getPreviousTime();
|
||||
|
||||
/**
|
||||
* Get the current grid point time.
|
||||
* @return current grid point time
|
||||
*/
|
||||
public double getCurrentTime();
|
||||
double getCurrentTime();
|
||||
|
||||
/**
|
||||
* Get the time of the interpolated point.
|
||||
|
@ -67,7 +66,7 @@ public interface StepInterpolator
|
|||
* the current grid point time.
|
||||
* @return interpolation point time
|
||||
*/
|
||||
public double getInterpolatedTime();
|
||||
double getInterpolatedTime();
|
||||
|
||||
/**
|
||||
* Set the time of the interpolated point.
|
||||
|
@ -81,7 +80,7 @@ public interface StepInterpolator
|
|||
* created using {@link #copy()}.</p>
|
||||
* @param time time of the interpolated point
|
||||
*/
|
||||
public void setInterpolatedTime(double time);
|
||||
void setInterpolatedTime(double time);
|
||||
|
||||
/**
|
||||
* Get the state vector of the interpolated point.
|
||||
|
@ -93,8 +92,7 @@ public interface StepInterpolator
|
|||
* @throws DerivativeException if this call induces an automatic
|
||||
* step finalization that throws one
|
||||
*/
|
||||
public double[] getInterpolatedState()
|
||||
throws DerivativeException;
|
||||
double[] getInterpolatedState() throws DerivativeException;
|
||||
|
||||
/**
|
||||
* Get the derivatives of the state vector of the interpolated point.
|
||||
|
@ -107,8 +105,7 @@ public interface StepInterpolator
|
|||
* step finalization that throws one
|
||||
* @since 2.0
|
||||
*/
|
||||
public double[] getInterpolatedDerivatives()
|
||||
throws DerivativeException;
|
||||
double[] getInterpolatedDerivatives() throws DerivativeException;
|
||||
|
||||
/** Check if the natural integration direction is forward.
|
||||
* <p>This method provides the integration direction as specified by
|
||||
|
@ -119,7 +116,7 @@ public interface StepInterpolator
|
|||
* @return true if the integration variable (time) increases during
|
||||
* integration
|
||||
*/
|
||||
public boolean isForward();
|
||||
boolean isForward();
|
||||
|
||||
/** Copy the instance.
|
||||
* <p>The copied instance is guaranteed to be independent from the
|
||||
|
@ -130,6 +127,6 @@ public interface StepInterpolator
|
|||
* step finalization that throws one
|
||||
* @see #setInterpolatedTime(double)
|
||||
*/
|
||||
public StepInterpolator copy() throws DerivativeException;
|
||||
StepInterpolator copy() throws DerivativeException;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public interface ParametricRealFunction {
|
|||
* @return the value
|
||||
* @throws FunctionEvaluationException if the function evaluation fails
|
||||
*/
|
||||
public double value(double x, double[] parameters)
|
||||
double value(double x, double[] parameters)
|
||||
throws FunctionEvaluationException;
|
||||
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ public interface ParametricRealFunction {
|
|||
* @return the value
|
||||
* @throws FunctionEvaluationException if the function evaluation fails
|
||||
*/
|
||||
public double[] gradient(double x, double[] parameters)
|
||||
double[] gradient(double x, double[] parameters)
|
||||
throws FunctionEvaluationException;
|
||||
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ public abstract class AbstractLeastSquaresOptimizer implements DifferentiableMul
|
|||
* @exception OptimizationException if the algorithm failed to converge
|
||||
* @exception IllegalArgumentException if the start point dimension is wrong
|
||||
*/
|
||||
abstract protected VectorialPointValuePair doOptimize()
|
||||
protected abstract VectorialPointValuePair doOptimize()
|
||||
throws FunctionEvaluationException, OptimizationException, IllegalArgumentException;
|
||||
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ public abstract class AbstractScalarDifferentiableOptimizer
|
|||
* @exception OptimizationException if the algorithm failed to converge
|
||||
* @exception IllegalArgumentException if the start point dimension is wrong
|
||||
*/
|
||||
abstract protected RealPointValuePair doOptimize()
|
||||
protected abstract RealPointValuePair doOptimize()
|
||||
throws FunctionEvaluationException, OptimizationException, IllegalArgumentException;
|
||||
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public abstract class AbstractLinearOptimizer implements LinearOptimizer {
|
|||
* @exception OptimizationException if no solution fulfilling the constraints
|
||||
* can be found in the allowed number of iterations
|
||||
*/
|
||||
abstract protected RealPointValuePair doOptimize()
|
||||
protected abstract RealPointValuePair doOptimize()
|
||||
throws OptimizationException;
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,6 @@ public interface NormalizedRandomGenerator {
|
|||
* standard deviation.</p>
|
||||
* @return a random scalar with null mean and unit standard deviation
|
||||
*/
|
||||
public double nextNormalizedDouble();
|
||||
double nextNormalizedDouble();
|
||||
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ package org.apache.commons.math.random;
|
|||
|
||||
public interface RandomVectorGenerator {
|
||||
|
||||
/** Generate a random vector.
|
||||
* @return a random vector as an array of double.
|
||||
*/
|
||||
public double[] nextVector();
|
||||
/** Generate a random vector.
|
||||
* @return a random vector as an array of double.
|
||||
*/
|
||||
double[] nextVector();
|
||||
|
||||
}
|
||||
|
|
|
@ -25,11 +25,13 @@ import org.apache.commons.math.linear.RealMatrix;
|
|||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface StatisticalMultivariateSummary {
|
||||
|
||||
/**
|
||||
* Returns the dimension of the data
|
||||
* @return The dimension of the data
|
||||
*/
|
||||
public int getDimension();
|
||||
int getDimension();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* mean of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -37,13 +39,15 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component means
|
||||
*/
|
||||
public abstract double[] getMean();
|
||||
double[] getMean();
|
||||
|
||||
/**
|
||||
* Returns the covariance of the available values.
|
||||
* @return The covariance, null if no multivariate sample
|
||||
* have been added or a zeroed matrix for a single value set.
|
||||
*/
|
||||
public abstract RealMatrix getCovariance();
|
||||
RealMatrix getCovariance();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* standard deviation of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -51,7 +55,8 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component standard deviations
|
||||
*/
|
||||
public abstract double[] getStandardDeviation();
|
||||
double[] getStandardDeviation();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* maximum of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -59,7 +64,8 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component maxima
|
||||
*/
|
||||
public abstract double[] getMax();
|
||||
double[] getMax();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* minimum of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -67,12 +73,14 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component minima
|
||||
*/
|
||||
public abstract double[] getMin();
|
||||
double[] getMin();
|
||||
|
||||
/**
|
||||
* Returns the number of available values
|
||||
* @return The number of available values
|
||||
*/
|
||||
public abstract long getN();
|
||||
long getN();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* geometric mean of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -80,7 +88,8 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component geometric means
|
||||
*/
|
||||
public double[] getGeometricMean();
|
||||
double[] getGeometricMean();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* sum of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -88,7 +97,8 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component sums
|
||||
*/
|
||||
public abstract double[] getSum();
|
||||
double[] getSum();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* sum of squares of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -96,7 +106,8 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component sums of squares
|
||||
*/
|
||||
public abstract double[] getSumSq();
|
||||
double[] getSumSq();
|
||||
|
||||
/**
|
||||
* Returns an array whose i<sup>th</sup> entry is the
|
||||
* sum of logs of the i<sup>th</sup> entries of the arrays
|
||||
|
@ -104,5 +115,6 @@ public interface StatisticalMultivariateSummary {
|
|||
*
|
||||
* @return the array of component log sums
|
||||
*/
|
||||
public abstract double[] getSumLog();
|
||||
double[] getSumLog();
|
||||
|
||||
}
|
||||
|
|
|
@ -22,42 +22,44 @@ package org.apache.commons.math.stat.descriptive;
|
|||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface StatisticalSummary {
|
||||
|
||||
/**
|
||||
* Returns the <a href="http://www.xycoon.com/arithmetic_mean.htm">
|
||||
* arithmetic mean </a> of the available values
|
||||
* @return The mean or Double.NaN if no values have been added.
|
||||
*/
|
||||
public abstract double getMean();
|
||||
double getMean();
|
||||
/**
|
||||
* Returns the variance of the available values.
|
||||
* @return The variance, Double.NaN if no values have been added
|
||||
* or 0.0 for a single value set.
|
||||
*/
|
||||
public abstract double getVariance();
|
||||
double getVariance();
|
||||
/**
|
||||
* Returns the standard deviation of the available values.
|
||||
* @return The standard deviation, Double.NaN if no values have been added
|
||||
* or 0.0 for a single value set.
|
||||
*/
|
||||
public abstract double getStandardDeviation();
|
||||
double getStandardDeviation();
|
||||
/**
|
||||
* Returns the maximum of the available values
|
||||
* @return The max or Double.NaN if no values have been added.
|
||||
*/
|
||||
public abstract double getMax();
|
||||
double getMax();
|
||||
/**
|
||||
* Returns the minimum of the available values
|
||||
* @return The min or Double.NaN if no values have been added.
|
||||
*/
|
||||
public abstract double getMin();
|
||||
double getMin();
|
||||
/**
|
||||
* Returns the number of available values
|
||||
* @return The number of available values
|
||||
*/
|
||||
public abstract long getN();
|
||||
long getN();
|
||||
/**
|
||||
* Returns the sum of the values that have been added to Univariate.
|
||||
* @return The sum or Double.NaN if no values have been added
|
||||
*/
|
||||
public abstract double getSum();
|
||||
double getSum();
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.Collection;
|
|||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public interface OneWayAnova {
|
||||
|
||||
/**
|
||||
* Computes the ANOVA F-value for a collection of <code>double[]</code>
|
||||
* arrays.
|
||||
|
@ -50,7 +51,7 @@ public interface OneWayAnova {
|
|||
* @throws MathException if the statistic can not be computed do to a
|
||||
* convergence or other numerical error.
|
||||
*/
|
||||
public double anovaFValue(Collection<double[]> categoryData)
|
||||
double anovaFValue(Collection<double[]> categoryData)
|
||||
throws IllegalArgumentException, MathException;
|
||||
|
||||
/**
|
||||
|
@ -71,7 +72,7 @@ public interface OneWayAnova {
|
|||
* @throws MathException if the statistic can not be computed do to a
|
||||
* convergence or other numerical error.
|
||||
*/
|
||||
public double anovaPValue(Collection<double[]> categoryData)
|
||||
double anovaPValue(Collection<double[]> categoryData)
|
||||
throws IllegalArgumentException, MathException;
|
||||
|
||||
/**
|
||||
|
@ -95,8 +96,8 @@ public interface OneWayAnova {
|
|||
* @throws IllegalArgumentException if the preconditions are not met
|
||||
* @throws MathException if the statistic can not be computed do to a
|
||||
* convergence or other numerical error.
|
||||
*/
|
||||
public boolean anovaTest(Collection<double[]> categoryData, double alpha)
|
||||
*/
|
||||
boolean anovaTest(Collection<double[]> categoryData, double alpha)
|
||||
throws IllegalArgumentException, MathException;
|
||||
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public interface TTest {
|
|||
* @throws MathException if the statistic can not be computed do to a
|
||||
* convergence or other numerical error.
|
||||
*/
|
||||
public abstract double pairedT(double[] sample1, double[] sample2)
|
||||
double pairedT(double[] sample1, double[] sample2)
|
||||
throws IllegalArgumentException, MathException;
|
||||
/**
|
||||
* Returns the <i>observed significance level</i>, or
|
||||
|
@ -100,7 +100,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double pairedTTest(double[] sample1, double[] sample2)
|
||||
double pairedTTest(double[] sample1, double[] sample2)
|
||||
throws IllegalArgumentException, MathException;
|
||||
/**
|
||||
* Performs a paired t-test evaluating the null hypothesis that the
|
||||
|
@ -134,7 +134,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the preconditions are not met
|
||||
* @throws MathException if an error occurs performing the test
|
||||
*/
|
||||
public abstract boolean pairedTTest(
|
||||
boolean pairedTTest(
|
||||
double[] sample1,
|
||||
double[] sample2,
|
||||
double alpha)
|
||||
|
@ -154,7 +154,7 @@ public interface TTest {
|
|||
* @return t statistic
|
||||
* @throws IllegalArgumentException if input array length is less than 2
|
||||
*/
|
||||
public abstract double t(double mu, double[] observed)
|
||||
double t(double mu, double[] observed)
|
||||
throws IllegalArgumentException;
|
||||
/**
|
||||
* Computes a <a href="http://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm#formula">
|
||||
|
@ -172,7 +172,7 @@ public interface TTest {
|
|||
* @return t statistic
|
||||
* @throws IllegalArgumentException if the precondition is not met
|
||||
*/
|
||||
public abstract double t(double mu, StatisticalSummary sampleStats)
|
||||
double t(double mu, StatisticalSummary sampleStats)
|
||||
throws IllegalArgumentException;
|
||||
/**
|
||||
* Computes a 2-sample t statistic, under the hypothesis of equal
|
||||
|
@ -207,7 +207,7 @@ public interface TTest {
|
|||
* @return t statistic
|
||||
* @throws IllegalArgumentException if the precondition is not met
|
||||
*/
|
||||
public abstract double homoscedasticT(double[] sample1, double[] sample2)
|
||||
double homoscedasticT(double[] sample1, double[] sample2)
|
||||
throws IllegalArgumentException;
|
||||
/**
|
||||
* Computes a 2-sample t statistic, without the hypothesis of equal
|
||||
|
@ -237,7 +237,7 @@ public interface TTest {
|
|||
* @return t statistic
|
||||
* @throws IllegalArgumentException if the precondition is not met
|
||||
*/
|
||||
public abstract double t(double[] sample1, double[] sample2)
|
||||
double t(double[] sample1, double[] sample2)
|
||||
throws IllegalArgumentException;
|
||||
/**
|
||||
* Computes a 2-sample t statistic </a>, comparing the means of the datasets
|
||||
|
@ -270,7 +270,7 @@ public interface TTest {
|
|||
* @return t statistic
|
||||
* @throws IllegalArgumentException if the precondition is not met
|
||||
*/
|
||||
public abstract double t(
|
||||
double t(
|
||||
StatisticalSummary sampleStats1,
|
||||
StatisticalSummary sampleStats2)
|
||||
throws IllegalArgumentException;
|
||||
|
@ -309,7 +309,7 @@ public interface TTest {
|
|||
* @return t statistic
|
||||
* @throws IllegalArgumentException if the precondition is not met
|
||||
*/
|
||||
public abstract double homoscedasticT(
|
||||
double homoscedasticT(
|
||||
StatisticalSummary sampleStats1,
|
||||
StatisticalSummary sampleStats2)
|
||||
throws IllegalArgumentException;
|
||||
|
@ -339,7 +339,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double tTest(double mu, double[] sample)
|
||||
double tTest(double mu, double[] sample)
|
||||
throws IllegalArgumentException, MathException;
|
||||
/**
|
||||
* Performs a <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm">
|
||||
|
@ -376,7 +376,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error computing the p-value
|
||||
*/
|
||||
public abstract boolean tTest(double mu, double[] sample, double alpha)
|
||||
boolean tTest(double mu, double[] sample, double alpha)
|
||||
throws IllegalArgumentException, MathException;
|
||||
/**
|
||||
* Returns the <i>observed significance level</i>, or
|
||||
|
@ -406,7 +406,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double tTest(double mu, StatisticalSummary sampleStats)
|
||||
double tTest(double mu, StatisticalSummary sampleStats)
|
||||
throws IllegalArgumentException, MathException;
|
||||
/**
|
||||
* Performs a <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm">
|
||||
|
@ -444,7 +444,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract boolean tTest(
|
||||
boolean tTest(
|
||||
double mu,
|
||||
StatisticalSummary sampleStats,
|
||||
double alpha)
|
||||
|
@ -485,7 +485,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double tTest(double[] sample1, double[] sample2)
|
||||
double tTest(double[] sample1, double[] sample2)
|
||||
throws IllegalArgumentException, MathException;
|
||||
/**
|
||||
* Returns the <i>observed significance level</i>, or
|
||||
|
@ -520,7 +520,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double homoscedasticTTest(
|
||||
double homoscedasticTTest(
|
||||
double[] sample1,
|
||||
double[] sample2)
|
||||
throws IllegalArgumentException, MathException;
|
||||
|
@ -574,7 +574,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the preconditions are not met
|
||||
* @throws MathException if an error occurs performing the test
|
||||
*/
|
||||
public abstract boolean tTest(
|
||||
boolean tTest(
|
||||
double[] sample1,
|
||||
double[] sample2,
|
||||
double alpha)
|
||||
|
@ -630,7 +630,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the preconditions are not met
|
||||
* @throws MathException if an error occurs performing the test
|
||||
*/
|
||||
public abstract boolean homoscedasticTTest(
|
||||
boolean homoscedasticTTest(
|
||||
double[] sample1,
|
||||
double[] sample2,
|
||||
double alpha)
|
||||
|
@ -669,7 +669,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double tTest(
|
||||
double tTest(
|
||||
StatisticalSummary sampleStats1,
|
||||
StatisticalSummary sampleStats2)
|
||||
throws IllegalArgumentException, MathException;
|
||||
|
@ -706,7 +706,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the precondition is not met
|
||||
* @throws MathException if an error occurs computing the p-value
|
||||
*/
|
||||
public abstract double homoscedasticTTest(
|
||||
double homoscedasticTTest(
|
||||
StatisticalSummary sampleStats1,
|
||||
StatisticalSummary sampleStats2)
|
||||
throws IllegalArgumentException, MathException;
|
||||
|
@ -763,7 +763,7 @@ public interface TTest {
|
|||
* @throws IllegalArgumentException if the preconditions are not met
|
||||
* @throws MathException if an error occurs performing the test
|
||||
*/
|
||||
public abstract boolean tTest(
|
||||
boolean tTest(
|
||||
StatisticalSummary sampleStats1,
|
||||
StatisticalSummary sampleStats2,
|
||||
double alpha)
|
||||
|
|
|
@ -418,10 +418,10 @@ public class NaturalRanking implements RankingAlgorithm {
|
|||
private static class IntDoublePair implements Comparable<IntDoublePair> {
|
||||
|
||||
/** Value of the pair */
|
||||
final private double value;
|
||||
private final double value;
|
||||
|
||||
/** Original position of the pair */
|
||||
final private int position;
|
||||
private final int position;
|
||||
|
||||
/**
|
||||
* Construct an IntDoublePair with the given value and position.
|
||||
|
|
|
@ -62,7 +62,7 @@ public interface RealTransformer {
|
|||
* @return the real inversely transformed array (signal)
|
||||
* @throws IllegalArgumentException if any parameters are invalid
|
||||
*/
|
||||
public abstract double[] inversetransform(double f[])
|
||||
double[] inversetransform(double f[])
|
||||
throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1565,7 +1565,7 @@ public final class MathUtils {
|
|||
* @param p2 the second point
|
||||
* @return the L<sub>1</sub> distance between the two points
|
||||
*/
|
||||
public static final double distance1(double[] p1, double[] p2) {
|
||||
public static double distance1(double[] p1, double[] p2) {
|
||||
double sum = 0;
|
||||
for (int i = 0; i < p1.length; i++) {
|
||||
sum += Math.abs(p1[i] - p2[i]);
|
||||
|
@ -1580,7 +1580,7 @@ public final class MathUtils {
|
|||
* @param p2 the second point
|
||||
* @return the L<sub>1</sub> distance between the two points
|
||||
*/
|
||||
public static final int distance1(int[] p1, int[] p2) {
|
||||
public static int distance1(int[] p1, int[] p2) {
|
||||
int sum = 0;
|
||||
for (int i = 0; i < p1.length; i++) {
|
||||
sum += Math.abs(p1[i] - p2[i]);
|
||||
|
@ -1595,7 +1595,7 @@ public final class MathUtils {
|
|||
* @param p2 the second point
|
||||
* @return the L<sub>2</sub> distance between the two points
|
||||
*/
|
||||
public static final double distance(double[] p1, double[] p2) {
|
||||
public static double distance(double[] p1, double[] p2) {
|
||||
double sum = 0;
|
||||
for (int i = 0; i < p1.length; i++) {
|
||||
final double dp = p1[i] - p2[i];
|
||||
|
@ -1611,7 +1611,7 @@ public final class MathUtils {
|
|||
* @param p2 the second point
|
||||
* @return the L<sub>2</sub> distance between the two points
|
||||
*/
|
||||
public static final double distance(int[] p1, int[] p2) {
|
||||
public static double distance(int[] p1, int[] p2) {
|
||||
int sum = 0;
|
||||
for (int i = 0; i < p1.length; i++) {
|
||||
final int dp = p1[i] - p2[i];
|
||||
|
@ -1627,7 +1627,7 @@ public final class MathUtils {
|
|||
* @param p2 the second point
|
||||
* @return the L<sub>∞</sub> distance between the two points
|
||||
*/
|
||||
public static final double distanceInf(double[] p1, double[] p2) {
|
||||
public static double distanceInf(double[] p1, double[] p2) {
|
||||
double max = 0;
|
||||
for (int i = 0; i < p1.length; i++) {
|
||||
max = Math.max(max, Math.abs(p1[i] - p2[i]));
|
||||
|
@ -1642,7 +1642,7 @@ public final class MathUtils {
|
|||
* @param p2 the second point
|
||||
* @return the L<sub>∞</sub> distance between the two points
|
||||
*/
|
||||
public static final int distanceInf(int[] p1, int[] p2) {
|
||||
public static int distanceInf(int[] p1, int[] p2) {
|
||||
int max = 0;
|
||||
for (int i = 0; i < p1.length; i++) {
|
||||
max = Math.max(max, Math.abs(p1[i] - p2[i]));
|
||||
|
|
Loading…
Reference in New Issue