You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2009/09/06 11:36:12 UTC
svn commit: r811786 - in /commons/proper/math/trunk: ./
src/main/java/org/apache/commons/math/
src/main/java/org/apache/commons/math/analysis/
src/main/java/org/apache/commons/math/analysis/interpolation/
src/main/java/org/apache/commons/math/distribut...
Author: luc
Date: Sun Sep 6 09:36:08 2009
New Revision: 811786
URL: http://svn.apache.org/viewvc?rev=811786&view=rev
Log:
tighten rules for public/private/abstract/final/... modifiers
Modified:
commons/proper/math/trunk/checkstyle.xml
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithm.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateRealFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/UnivariateRealInterpolator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/Fitness.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/GeneticAlgorithm.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/PermutationChromosome.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrix.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldVector.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventHandler.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepHandler.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/NormalizedRandomGenerator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomVectorGenerator.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalMultivariateSummary.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummary.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnova.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTest.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/ranking/NaturalRanking.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Modified: commons/proper/math/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/checkstyle.xml?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/checkstyle.xml (original)
+++ commons/proper/math/trunk/checkstyle.xml Sun Sep 6 09:36:08 2009
@@ -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" />
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithm.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithm.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithm.java Sun Sep 6 09:36:08 2009
@@ -41,14 +41,14 @@
*
* @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 @@
*
* @see #setMaximalIterationCount(int)
*/
- public abstract void resetMaximalIterationCount();
+ void resetMaximalIterationCount();
/**
* Set the absolute accuracy.
@@ -74,21 +74,21 @@
* @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 @@
* @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 @@
* @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();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java Sun Sep 6 09:36:08 2009
@@ -30,6 +30,6 @@
*
* @return the derivative function
*/
- public UnivariateMatrixFunction derivative();
+ UnivariateMatrixFunction derivative();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateRealFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateRealFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateRealFunction.java Sun Sep 6 09:36:08 2009
@@ -29,6 +29,6 @@
*
* @return the derivative function
*/
- public UnivariateRealFunction derivative();
+ UnivariateRealFunction derivative();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java Sun Sep 6 09:36:08 2009
@@ -30,6 +30,6 @@
*
* @return the derivative function
*/
- public UnivariateVectorialFunction derivative();
+ UnivariateVectorialFunction derivative();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java Sun Sep 6 09:36:08 2009
@@ -25,12 +25,13 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java Sun Sep 6 09:36:08 2009
@@ -24,12 +24,13 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java Sun Sep 6 09:36:08 2009
@@ -25,12 +25,13 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/UnivariateRealInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/UnivariateRealInterpolator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/UnivariateRealInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/UnivariateRealInterpolator.java Sun Sep 6 09:36:08 2009
@@ -34,6 +34,6 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java Sun Sep 6 09:36:08 2009
@@ -102,7 +102,7 @@
* @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
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java Sun Sep 6 09:36:08 2009
@@ -31,39 +31,41 @@
* @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);
+
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java Sun Sep 6 09:36:08 2009
@@ -38,7 +38,7 @@
*
* @return the mean for the distribution.
*/
- public double getMean();
+ double getMean();
/**
* Set the mean for the distribution.
@@ -48,7 +48,7 @@
* @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 @@
* @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;
+
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java Sun Sep 6 09:36:08 2009
@@ -30,12 +30,13 @@
* @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 @@
* @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 @@
* @param s the exponent
* @throws IllegalArgumentException if s ≤ 0.0
*/
- public void setExponent(double s);
+ void setExponent(double s);
+
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java Sun Sep 6 09:36:08 2009
@@ -46,22 +46,23 @@
*/
@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();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java Sun Sep 6 09:36:08 2009
@@ -53,8 +53,7 @@
* @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 @@
* @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 @@
* @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 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/Fitness.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/Fitness.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/Fitness.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/Fitness.java Sun Sep 6 09:36:08 2009
@@ -23,11 +23,13 @@
* @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();
+
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/GeneticAlgorithm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/GeneticAlgorithm.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/GeneticAlgorithm.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/GeneticAlgorithm.java Sun Sep 6 09:36:08 2009
@@ -42,7 +42,7 @@
*
* @param random random generator
*/
- public synchronized static void setRandomGenerator(RandomGenerator random) {
+ public static synchronized void setRandomGenerator(RandomGenerator random) {
randomGenerator = random;
}
@@ -51,7 +51,7 @@
*
* @return the static random generator shared by GA implementation classes
*/
- public synchronized static RandomGenerator getRandomGenerator() {
+ public static synchronized RandomGenerator getRandomGenerator() {
return randomGenerator;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/PermutationChromosome.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/PermutationChromosome.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/PermutationChromosome.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/genetics/PermutationChromosome.java Sun Sep 6 09:36:08 2009
@@ -39,6 +39,6 @@
* @return permutation of <code>sequence</code> represented by this
* permutation
*/
- public List<T> decode(List<T> sequence);
+ List<T> decode(List<T> sequence);
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrix.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrix.java Sun Sep 6 09:36:08 2009
@@ -91,7 +91,7 @@
* @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.
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java Sun Sep 6 09:36:08 2009
@@ -108,7 +108,7 @@
* @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.
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldVector.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldVector.java Sun Sep 6 09:36:08 2009
@@ -172,8 +172,7 @@
* @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 @@
* @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 @@
* @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 @@
* @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.
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java Sun Sep 6 09:36:08 2009
@@ -98,7 +98,7 @@
* @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.
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java Sun Sep 6 09:36:08 2009
@@ -463,8 +463,7 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* 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 @@
* @return true if any coordinate of this vector is infinite and none are NaN;
* false otherwise
*/
- public boolean isInfinite();
+ boolean isInfinite();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java Sun Sep 6 09:36:08 2009
@@ -50,7 +50,7 @@
/** 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 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java Sun Sep 6 09:36:08 2009
@@ -53,9 +53,8 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java Sun Sep 6 09:36:08 2009
@@ -46,23 +46,22 @@
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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java Sun Sep 6 09:36:08 2009
@@ -50,9 +50,9 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventHandler.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventHandler.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventHandler.java Sun Sep 6 09:36:08 2009
@@ -54,7 +54,7 @@
* #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 @@
* 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 @@
* 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 @@
* @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 @@
* {@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 @@
* 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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java Sun Sep 6 09:36:08 2009
@@ -57,7 +57,6 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepHandler.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepHandler.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepHandler.java Sun Sep 6 09:36:08 2009
@@ -49,13 +49,13 @@
* 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 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java Sun Sep 6 09:36:08 2009
@@ -46,20 +46,19 @@
* @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 @@
* 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 @@
* 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 @@
* @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 @@
* 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 @@
* @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 @@
* step finalization that throws one
* @see #setInterpolatedTime(double)
*/
- public StepInterpolator copy() throws DerivativeException;
+ StepInterpolator copy() throws DerivativeException;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java Sun Sep 6 09:36:08 2009
@@ -34,7 +34,7 @@
* @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 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java Sun Sep 6 09:36:08 2009
@@ -354,7 +354,7 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java Sun Sep 6 09:36:08 2009
@@ -195,7 +195,7 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java Sun Sep 6 09:36:08 2009
@@ -112,7 +112,7 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/NormalizedRandomGenerator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/NormalizedRandomGenerator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/NormalizedRandomGenerator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/NormalizedRandomGenerator.java Sun Sep 6 09:36:08 2009
@@ -33,6 +33,6 @@
* standard deviation.</p>
* @return a random scalar with null mean and unit standard deviation
*/
- public double nextNormalizedDouble();
+ double nextNormalizedDouble();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomVectorGenerator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomVectorGenerator.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomVectorGenerator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomVectorGenerator.java Sun Sep 6 09:36:08 2009
@@ -27,9 +27,9 @@
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();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalMultivariateSummary.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalMultivariateSummary.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalMultivariateSummary.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalMultivariateSummary.java Sun Sep 6 09:36:08 2009
@@ -25,11 +25,13 @@
* @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 @@
*
* @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 @@
*
* @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 @@
*
* @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 @@
*
* @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 @@
*
* @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 @@
*
* @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 @@
*
* @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 @@
*
* @return the array of component log sums
*/
- public abstract double[] getSumLog();
+ double[] getSumLog();
+
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummary.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummary.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummary.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummary.java Sun Sep 6 09:36:08 2009
@@ -22,42 +22,44 @@
* @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();
+
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnova.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnova.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnova.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnova.java Sun Sep 6 09:36:08 2009
@@ -32,6 +32,7 @@
* @version $Revision$ $Date$
*/
public interface OneWayAnova {
+
/**
* Computes the ANOVA F-value for a collection of <code>double[]</code>
* arrays.
@@ -50,7 +51,7 @@
* @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 @@
* @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 @@
* @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;
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTest.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTest.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTest.java Sun Sep 6 09:36:08 2009
@@ -65,7 +65,7 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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)
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/ranking/NaturalRanking.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/ranking/NaturalRanking.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/ranking/NaturalRanking.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/ranking/NaturalRanking.java Sun Sep 6 09:36:08 2009
@@ -418,10 +418,10 @@
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.
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java Sun Sep 6 09:36:08 2009
@@ -62,7 +62,7 @@
* @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;
/**
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=811786&r1=811785&r2=811786&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Sun Sep 6 09:36:08 2009
@@ -1565,7 +1565,7 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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]));