Permalink
Browse files

Tagged 1.2-RC1

  • Loading branch information...
1 parent f5a644e commit 7ea594a30213c98528373e4b70f6e9a31896cb1d @psteitz psteitz committed Feb 11, 2008
Showing with 669 additions and 268 deletions.
  1. +153 −0 RELEASE-NOTES.txt
  2. +6 −1 pom.xml
  3. +4 −4 project.xml
  4. +20 −3 release-notes.jsl
  5. +4 −7 src/assembly/src.xml
  6. +1 −0 src/java/org/apache/commons/math/ArgumentOutsideDomainException.java
  7. +2 −0 src/java/org/apache/commons/math/ConvergenceException.java
  8. +2 −0 src/java/org/apache/commons/math/DimensionMismatchException.java
  9. +2 −0 src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java
  10. +3 −0 src/java/org/apache/commons/math/FunctionEvaluationException.java
  11. +2 −0 src/java/org/apache/commons/math/MathConfigurationException.java
  12. +6 −2 src/java/org/apache/commons/math/MathException.java
  13. +1 −0 src/java/org/apache/commons/math/MaxIterationsExceededException.java
  14. +7 −3 src/java/org/apache/commons/math/MessagesResources_fr.java
  15. +1 −0 src/java/org/apache/commons/math/analysis/DividedDifferenceInterpolator.java
  16. +1 −0 src/java/org/apache/commons/math/analysis/LaguerreSolver.java
  17. +1 −0 src/java/org/apache/commons/math/analysis/MullerSolver.java
  18. +1 −0 src/java/org/apache/commons/math/analysis/NevilleInterpolator.java
  19. +1 −0 src/java/org/apache/commons/math/analysis/PolynomialFunctionLagrangeForm.java
  20. +1 −0 src/java/org/apache/commons/math/analysis/PolynomialFunctionNewtonForm.java
  21. +1 −0 src/java/org/apache/commons/math/analysis/RiddersSolver.java
  22. +1 −0 src/java/org/apache/commons/math/analysis/RombergIntegrator.java
  23. +1 −0 src/java/org/apache/commons/math/analysis/SimpsonIntegrator.java
  24. +1 −0 src/java/org/apache/commons/math/analysis/TrapezoidIntegrator.java
  25. +1 −0 src/java/org/apache/commons/math/analysis/UnivariateRealIntegrator.java
  26. +1 −0 src/java/org/apache/commons/math/analysis/UnivariateRealIntegratorImpl.java
  27. +8 −3 src/java/org/apache/commons/math/complex/Complex.java
  28. +28 −0 src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
  29. +1 −0 src/java/org/apache/commons/math/estimation/AbstractEstimator.java
  30. +1 −0 src/java/org/apache/commons/math/estimation/EstimatedParameter.java
  31. +1 −0 src/java/org/apache/commons/math/estimation/EstimationException.java
  32. +1 −0 src/java/org/apache/commons/math/estimation/EstimationProblem.java
  33. +1 −0 src/java/org/apache/commons/math/estimation/Estimator.java
  34. +1 −0 src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java
  35. +2 −1 src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
  36. +1 −0 src/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java
  37. +1 −0 src/java/org/apache/commons/math/estimation/WeightedMeasurement.java
  38. +14 −22 src/java/org/apache/commons/math/fraction/Fraction.java
  39. +1 −0 src/java/org/apache/commons/math/fraction/FractionConversionException.java
  40. +3 −2 src/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java
  41. +6 −4 src/java/org/apache/commons/math/geometry/NotARotationMatrixException.java
  42. +6 −6 src/java/org/apache/commons/math/geometry/Rotation.java
  43. +3 −3 src/java/org/apache/commons/math/geometry/RotationOrder.java
  44. +3 −1 src/java/org/apache/commons/math/geometry/Vector3D.java
  45. +1 −1 src/java/org/apache/commons/math/linear/MatrixUtils.java
  46. +1 −1 src/java/org/apache/commons/math/linear/QRDecomposition.java
  47. +2 −2 src/java/org/apache/commons/math/linear/QRDecompositionImpl.java
  48. +1 −0 src/java/org/apache/commons/math/ode/AbstractStepInterpolator.java
  49. +6 −5 src/java/org/apache/commons/math/ode/AdaptiveStepsizeIntegrator.java
  50. +3 −4 src/java/org/apache/commons/math/ode/ClassicalRungeKuttaIntegrator.java
  51. +4 −5 src/java/org/apache/commons/math/ode/ClassicalRungeKuttaStepInterpolator.java
  52. +7 −8 src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
  53. +1 −0 src/java/org/apache/commons/math/ode/DerivativeException.java
  54. +3 −3 src/java/org/apache/commons/math/ode/DormandPrince54Integrator.java
  55. +1 −1 src/java/org/apache/commons/math/ode/DormandPrince54StepInterpolator.java
  56. +4 −4 src/java/org/apache/commons/math/ode/DormandPrince853Integrator.java
  57. +1 −1 src/java/org/apache/commons/math/ode/DormandPrince853StepInterpolator.java
  58. +3 −4 src/java/org/apache/commons/math/ode/DummyStepHandler.java
  59. +1 −1 src/java/org/apache/commons/math/ode/DummyStepInterpolator.java
  60. +5 −5 src/java/org/apache/commons/math/ode/EmbeddedRungeKuttaIntegrator.java
  61. +5 −6 src/java/org/apache/commons/math/ode/EulerIntegrator.java
  62. +5 −6 src/java/org/apache/commons/math/ode/EulerStepInterpolator.java
  63. +5 −6 src/java/org/apache/commons/math/ode/FirstOrderConverter.java
  64. +1 −1 src/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java
  65. +2 −3 src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
  66. +2 −3 src/java/org/apache/commons/math/ode/FixedStepHandler.java
  67. +2 −3 src/java/org/apache/commons/math/ode/GillIntegrator.java
  68. +4 −5 src/java/org/apache/commons/math/ode/GillStepInterpolator.java
  69. +8 −8 src/java/org/apache/commons/math/ode/GraggBulirschStoerIntegrator.java
  70. +7 −8 src/java/org/apache/commons/math/ode/GraggBulirschStoerStepInterpolator.java
  71. +3 −3 src/java/org/apache/commons/math/ode/HighamHall54Integrator.java
  72. +1 −1 src/java/org/apache/commons/math/ode/HighamHall54StepInterpolator.java
  73. +1 −0 src/java/org/apache/commons/math/ode/IntegratorException.java
  74. +4 −4 src/java/org/apache/commons/math/ode/MidpointIntegrator.java
  75. +5 −6 src/java/org/apache/commons/math/ode/MidpointStepInterpolator.java
  76. +3 −4 src/java/org/apache/commons/math/ode/RungeKuttaIntegrator.java
  77. +1 −1 src/java/org/apache/commons/math/ode/RungeKuttaStepInterpolator.java
  78. +4 −5 src/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
  79. +3 −4 src/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
  80. +3 −4 src/java/org/apache/commons/math/ode/StepHandler.java
  81. +1 −2 src/java/org/apache/commons/math/ode/StepInterpolator.java
  82. +4 −5 src/java/org/apache/commons/math/ode/StepNormalizer.java
  83. +1 −1 src/java/org/apache/commons/math/ode/SwitchState.java
  84. +1 −1 src/java/org/apache/commons/math/ode/SwitchingFunction.java
  85. +1 −2 src/java/org/apache/commons/math/ode/SwitchingFunctionsHandler.java
  86. +3 −4 src/java/org/apache/commons/math/ode/ThreeEighthesIntegrator.java
  87. +5 −6 src/java/org/apache/commons/math/ode/ThreeEighthesStepInterpolator.java
  88. +3 −3 src/java/org/apache/commons/math/optimization/ConvergenceChecker.java
  89. +4 −3 src/java/org/apache/commons/math/optimization/CostException.java
  90. +5 −2 src/java/org/apache/commons/math/optimization/CostFunction.java
  91. +9 −7 src/java/org/apache/commons/math/optimization/DirectSearchOptimizer.java
  92. +4 −2 src/java/org/apache/commons/math/optimization/MultiDirectional.java
  93. +4 −2 src/java/org/apache/commons/math/optimization/NelderMead.java
  94. +3 −1 src/java/org/apache/commons/math/optimization/PointCostPair.java
  95. +3 −3 src/java/org/apache/commons/math/random/CorrelatedRandomVectorGenerator.java
  96. +4 −2 src/java/org/apache/commons/math/random/GaussianRandomGenerator.java
  97. +1 −1 src/java/org/apache/commons/math/random/JDKRandomGenerator.java
  98. +4 −2 src/java/org/apache/commons/math/random/NormalizedRandomGenerator.java
  99. +1 −1 src/java/org/apache/commons/math/random/RandomAdaptor.java
  100. +1 −1 src/java/org/apache/commons/math/random/RandomGenerator.java
  101. +1 −0 src/java/org/apache/commons/math/random/UncorrelatedRandomVectorGenerator.java
  102. +86 −19 src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
  103. +19 −1 src/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java
  104. +3 −0 src/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java
  105. +2 −1 src/java/org/apache/commons/math/stat/inference/UnknownDistributionChiSquareTest.java
  106. +1 −0 src/java/org/apache/commons/math/transform/FastCosineTransformer.java
  107. +1 −0 src/java/org/apache/commons/math/transform/FastFourierTransformer.java
  108. +1 −0 src/java/org/apache/commons/math/transform/FastSineTransformer.java
  109. +5 −0 src/java/org/apache/commons/math/util/MathUtils.java
  110. +3 −3 src/site/site.xml
  111. +15 −5 src/site/xdoc/changes.xml
  112. +50 −0 src/test/org/apache/commons/math/distribution/IntegerDistributionAbstractTest.java
View
153 RELEASE-NOTES.txt
@@ -0,0 +1,153 @@
+
+ Apache Commons Math Version 1.2-RC1
+ RELEASE NOTES
+
+
+This release combines bug fixes and new features. Most notable among the new
+features are the estimation, optimization, geometry and ode packages added
+from the Mantissa library. Implementations of fast Fourier transform, QR
+decomposition and several numerical integration algorithms have also been
+added, along with enhancements and extensions to packages included in Commons
+Math 1.1. This release is source and binary compatible with earlier versions
+of Commons Math.
+
+For more information on Apache Commons Math, see
+http://commons.apache.org/math/
+
+
+ SUMMARY OF CHANGES
+
+ADDITIONS
+
+* Added the estimation, optimization, geometry and ode packages from the
+ Mantissa library.
+
+* MATH-120. Added Pascal distribution implementation. Thanks to Todd C.
+ Parnell.
+
+* MATH-148. Added QR Decomposition. Thanks to Joni Salonen.
+
+* MATH-140. Added Fast Fourier Transform implementation. Thanks to Xiaogang
+ Zhang.
+
+* MATH-173. Added one-way ANOVA implementation. Thanks to Bob MacCallum.
+
+* Added an angle normalization method in MathUtils to force angles in some
+ user-defined interval
+
+* Added vectorial covariance computation (either sample or population
+ covariance)
+
+* Added multivariate summary statistics.
+
+
+BUG FIXES
+
+* Fixed numerous warnings in test code.
+
+* MATH-156. Use the initial guess provided by the user in
+ BrentSolver.solve(), thus improving speed. Thanks to Tyler Ward.
+
+* MATH-18. Made ComplexFormat format double values with a provided
+ NumberFormat instance instead of using the real part format for all values.
+ Thanks to Phil Steitz.
+
+* MATH-60. Modified ProperFractionFormat to reject embedded minus signs.
+ Thanks to Nhung Nnguyen.
+
+* MATH-151. Added a nextAfter method in MathUtils to return the next
+ machine-representable number in a specified direction from a given floating
+ point number. Used this to ensure that MathUtils.round does not return
+ incorrect results for numbers with bad IEEE754 representations. Thanks to
+ Luc Maisonobe.
+
+* MATH-85. Modified getSumSquaredErrors method in SimpleRegression to always
+ return a non-negative result. Thanks to Mark Osborn, Luc Maisonobe.
+
+* MATH-153. Corrected nextInt and nextLong to handle wide value ranges.
+ Thanks to Remi Arntzen.
+
+* MATH-166. Increased default precision of Gamma and Beta functions. Thanks
+ to Lukas Theussl.
+
+* MATH-167. Modified NormalDistributionImpl.cumulativeProbablity to catch
+ MaxIterationsExceededException and return 0 or 1, resp. if the argument is
+ more than 20 standard deviations from the mean.
+
+* MATH-174. Changed Mean.evaluate() to use a two-pass algorithm, improving
+ accuracy by exploiting the the fact that this method has access to the full
+ array of data values.
+
+* MATH-175. Added check and rescaling of expected counts to sum to sum of
+ expected counts if necessary in ChiSquare test. Thanks to Carl Anderson.
+
+* MATH-164. Handle multiplication of Complex numbers with infinite parts
+ specially.
+
+* MATH-182. Add integer overflow checks in Fraction constructor using double
+ parameter.
+
+* MATH-185. Throw EOFException when using empty files with ValueServer in
+ replay and digest modes.
+
+* MATH-184. Fixed AbstractIntegerDistribution cumulativeProbablility(-,-) to
+ correctly handle double arguments. Thanks to Yegor Bryukhov.
+
+
+UPDATES
+
+* MATH-158. Added log function to MathUtils. Thanks to Hasan Diwan.
+
+* MATH-160. Added two sample (binned comparison) ChiSquare test. Thanks to
+ Matthias Hummel.
+
+* MATH-170. Added SynchronizedDescriptiveStatistics class. Thanks to David J.
+ M. Karlsen.
+
+* MATH-154. Added addAndCheck, mulAndCheck, and subAndCheck MathUtils methods
+ for long integer arguments. Thanks to Remi Arntzen.
+
+* MATH-171. Merged most functions from ComplexUtils into Complex class, added
+ static factory method to Complex. Thanks to Niall Pemberton.
+
+* Deprecated abstract factory methods and made DescriptiveStatistics and and
+ SummaryStatistics concrete classes. Pushed implementations up from
+ DescriptiveStatisticsImpl, SummaryStatisticsImpl. Made implementations of
+ statistics configurable via setters.
+
+* MATH-176. Add errors guessing to least-squares estimators. Thanks to
+ Kazuhiro Koshino.
+
+* MATH-179. Add tests for Fraction constructor using double parameter. Thanks
+ to Niall Pemberton.
+
+* MATH-181. Add Fraction constructor using max denominator value. Thanks to
+ Niall Pemberton.
+
+* Added a equals and hash methods in MathUtils to check for double arrays
+
+* MATH-191. Added getSumOfLogs method to SummaryStatistics and made SumOfLogs
+ instance used by GeometricMean configurable.
+
+* MATH-188. Made numerator and denominator final in Fraction and deprecated
+ protected real and imaginary parts fields in Complex, making Fraction
+ immutable and preparing Complex to become fully immutable in 2.0. Thanks to
+ Sebastian Bazley.
+
+DEPRECATIONS SUMMARY
+
+* The abstract factory pattern used to enable pluggable implementations in the
+ statistics, analysis and distributions packages has been deprecated and
+ replaced by setter injection.
+
+* Non-localized exception messages and associated constructors have been
+ deprecated and replaced by localized versions.
+
+* Most methods from the ComplexUtils class have been deprecated, with
+ implementations moved to the Complex class.
+
+See "clirr-report.html" included in the binary distribution for a detailed list
+of API changes. The "errors" reported at the top of the report are due to
+protected fields being moved to superclasses. These fields are still available,
+so there is no backward compatibility issue.
+
View
7 pom.xml
@@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>commons-math</groupId>
<artifactId>commons-math</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.2-RC1</version>
<name>Commons Math</name>
<inceptionYear>2003</inceptionYear>
@@ -270,6 +270,7 @@ org.apache.commons.math.stat.regression;version=${project.version},
org.apache.commons.math.transform;version=${project.version},
org.apache.commons.math.util;version=${project.version}
</Import-Package>
+ <Built-By>psteitz</Built-By>
</manifestEntries>
</archive>
</configuration>
@@ -284,6 +285,7 @@ org.apache.commons.math.util;version=${project.version}
</descriptors>
</configuration>
</plugin>
+ <!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
@@ -296,6 +298,7 @@ org.apache.commons.math.util;version=${project.version}
</execution>
</executions>
</plugin>
+ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
@@ -322,11 +325,13 @@ org.apache.commons.math.util;version=${project.version}
<excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
+ <!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
+ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
View
8 project.xml
@@ -23,7 +23,7 @@
<name>Math</name>
<groupId>commons-math</groupId>
<artifactId>commons-math</artifactId>
- <currentVersion>1.2-SNAPSHOT</currentVersion>
+ <currentVersion>1.2-RC1</currentVersion>
<inceptionYear>2003</inceptionYear>
<shortDescription>Commons Math</shortDescription>
<description>The Math project is a library of lightweight, self-contained mathematics and statistics components addressing the most common practical problems not immediately available in the Java programming language or commons-lang.</description>
@@ -107,9 +107,9 @@
<tag>MATH_1_1</tag>
</version>
<version>
- <id>1.2-SNAPSHOT</id>
- <name>1.1</name>
- <tag>trunk</tag>
+ <id>1.2-RC1</id>
+ <name>1.2</name>
+ <tag>MATH_1_2_RC1</tag>
</version>
</versions>
<developers>
View
23 release-notes.jsl
@@ -108,7 +108,26 @@ UPDATES
<x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
</j:forEach>
</j:if>
- </j:if>
+<j:whitespace trim="false">
+DEPRECATIONS SUMMARY
+
+* The abstract factory pattern used to enable pluggable implementations in the
+ statistics, analysis and distributions packages has been deprecated and
+ replaced by setter injection.
+
+* Non-localized exception messages and associated constructors have been
+ deprecated and replaced by localized versions.
+
+* Most methods from the ComplexUtils class have been deprecated, with
+ implementations moved to the Complex class.
+
+See "clirr-report.html" included in the binary distribution for a detailed list
+of API changes. The "errors" reported at the top of the report are due to
+protected fields being moved to superclasses. These fields are still available,
+so there is no backward compatibility issue.
+
+</j:whitespace>
+ </j:if>
</jsl:template>
<jsl:template match="action" trim="true">
@@ -140,7 +159,5 @@ UPDATES
</jsl:template>
<jsl:template match="@*"/>
-
<jsl:template match="text()"/>
-
</jsl:stylesheet>
View
11 src/assembly/src.xml
@@ -37,19 +37,16 @@
<include>build.properties.sample</include>
<include>checkstyle.xml</include>
<include>RELEASE-NOTES*</include>
- <include>license-header.txt</include>
- <include>PROPOSAL.html</include>
<include>release-notes.jsl</include>
- <include>test-jar.xml</include>
- <include>testOnly.sh</include>
<include>findbugs-exclude-filter.xml</include>
</includes>
</fileSet>
<fileSet>
<directory>src</directory>
- </fileSet>
- <fileSet>
- <directory>xdocs</directory>
+ <excludes>
+ <exclude>**/mantissa/**</exclude>
+ <exclude>**/experimental/**</exclude>
+ </excludes>
</fileSet>
</fileSets>
</assembly>
View
1 src/java/org/apache/commons/math/ArgumentOutsideDomainException.java
@@ -20,6 +20,7 @@
/**
* Error thrown when a method is called with an out of bounds argument.
*
+ * @since 1.2
* @version $Revision$ $Date$
*/
public class ArgumentOutsideDomainException extends FunctionEvaluationException {
View
2 src/java/org/apache/commons/math/ConvergenceException.java
@@ -39,6 +39,7 @@ public ConvergenceException() {
* Message formatting is delegated to {@link java.text.MessageFormat}.
* @param pattern format specifier
* @param arguments format arguments
+ * @since 1.2
*/
public ConvergenceException(String pattern, Object[] arguments) {
super(pattern, arguments);
@@ -58,6 +59,7 @@ public ConvergenceException(Throwable cause) {
* @param pattern format specifier
* @param arguments format arguments
* @param cause the exception or error that caused this exception to be thrown
+ * @since 1.2
*/
public ConvergenceException(String pattern, Object[] arguments, Throwable cause) {
super(pattern, arguments, cause);
View
2 src/java/org/apache/commons/math/DimensionMismatchException.java
@@ -18,6 +18,8 @@
/**
* Error thrown when two dimensions differ.
+ *
+ * @since 1.2
* @version $Revision$ $Date$
*/
public class DimensionMismatchException extends MathException {
View
2 src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java
@@ -18,6 +18,8 @@
/**
* Exeption thrown when a sample contains several entries at the same abscissa.
+ *
+ * @since 1.2
* @version $Revision$ $Date$
*/
public class DuplicateSampleAbscissaException extends MathException {
View
3 src/java/org/apache/commons/math/FunctionEvaluationException.java
@@ -63,6 +63,7 @@ public FunctionEvaluationException(double argument, String message) {
* @param argument the failing function argument
* @param pattern format specifier
* @param arguments format arguments
+ * @since 1.2
*/
public FunctionEvaluationException(double argument,
String pattern, Object[] arguments) {
@@ -89,6 +90,7 @@ public FunctionEvaluationException(double argument,
* Message formatting is delegated to {@link java.text.MessageFormat}.
* @param argument the failing function argument
* @param cause the exception or error that caused this exception to be thrown
+ * @since 1.2
*/
public FunctionEvaluationException(double argument, Throwable cause) {
super(cause);
@@ -102,6 +104,7 @@ public FunctionEvaluationException(double argument, Throwable cause) {
* @param pattern format specifier
* @param arguments format arguments
* @param cause the exception or error that caused this exception to be thrown
+ * @since 1.2
*/
public FunctionEvaluationException(double argument,
String pattern, Object[] arguments,
View
2 src/java/org/apache/commons/math/MathConfigurationException.java
@@ -47,6 +47,7 @@ public MathConfigurationException(String message) {
* Message formatting is delegated to {@link java.text.MessageFormat}.
* @param pattern format specifier
* @param arguments format arguments
+ * @since 1.2
*/
public MathConfigurationException(String pattern, Object[] arguments) {
super(pattern, arguments);
@@ -76,6 +77,7 @@ public MathConfigurationException(Throwable cause) {
* @param pattern format specifier
* @param arguments format arguments
* @param cause the exception or error that caused this exception to be thrown
+ * @since 1.2
*/
public MathConfigurationException(String pattern, Object[] arguments, Throwable cause) {
super(pattern, arguments, cause);
View
8 src/java/org/apache/commons/math/MathException.java
@@ -191,8 +191,9 @@ public MathException(String msg, Throwable rootCause) {
* Message formatting is delegated to {@link java.text.MessageFormat}.
* @param pattern format specifier
* @param arguments format arguments
- * @param rootCause the exception or error that caused this exception
- * to be thrown.
+ * @param rootCause the exception or error that caused this exception
+ * to be thrown.
+ * @since 1.2
*/
public MathException(String pattern, Object[] arguments, Throwable rootCause) {
super(buildMessage(pattern, arguments, Locale.US));
@@ -204,6 +205,7 @@ public MathException(String pattern, Object[] arguments, Throwable rootCause) {
/** Gets the pattern used to build the message of this throwable.
*
* @return the pattern used to build the message of this throwable
+ * @since 1.2
*/
public String getPattern() {
return pattern;
@@ -212,6 +214,7 @@ public String getPattern() {
/** Gets the arguments used to build the message of this throwable.
*
* @return the arguments used to build the message of this throwable
+ * @since 1.2
*/
public Object[] getArguments() {
return (Object[]) arguments.clone();
@@ -222,6 +225,7 @@ public String getPattern() {
* @param locale Locale in which the message should be translated
*
* @return localized message
+ * @since 1.2
*/
public String getMessage(Locale locale) {
return (pattern == null) ? null : buildMessage(pattern, arguments, locale);
View
1 src/java/org/apache/commons/math/MaxIterationsExceededException.java
@@ -24,6 +24,7 @@
* number of iterations.
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class MaxIterationsExceededException extends ConvergenceException {
View
10 src/java/org/apache/commons/math/MessagesResources_fr.java
@@ -19,18 +19,22 @@
import java.util.ListResourceBundle;
-/** French localization message resources for the commons-math library.
+/**
+ * French localization message resources for the commons-math library.
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class MessagesResources_fr
extends ListResourceBundle {
- /** Simple constructor.
+ /**
+ * Simple constructor.
*/
public MessagesResources_fr() {
}
- /** Get the non-translated/translated messages arrays from this resource bundle.
+ /**
+ * Get the non-translated/translated messages arrays from this resource bundle.
* @return non-translated/translated messages arrays
*/
public Object[][] getContents() {
View
1 src/java/org/apache/commons/math/analysis/DividedDifferenceInterpolator.java
@@ -31,6 +31,7 @@
* this class provides an easy-to-use interface to it.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class DividedDifferenceInterpolator implements UnivariateRealInterpolator,
Serializable {
View
1 src/java/org/apache/commons/math/analysis/LaguerreSolver.java
@@ -31,6 +31,7 @@
* approximation and be able to solve all roots from that point.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class LaguerreSolver extends UnivariateRealSolverImpl {
View
1 src/java/org/apache/commons/math/analysis/MullerSolver.java
@@ -31,6 +31,7 @@
* real zeros, using different ways to bypass complex arithmetics.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class MullerSolver extends UnivariateRealSolverImpl {
View
1 src/java/org/apache/commons/math/analysis/NevilleInterpolator.java
@@ -29,6 +29,7 @@
* this class provides an easy-to-use interface to it.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class NevilleInterpolator implements UnivariateRealInterpolator,
Serializable {
View
1 src/java/org/apache/commons/math/analysis/PolynomialFunctionLagrangeForm.java
@@ -31,6 +31,7 @@
* to work well. Otherwise, consider using splines instead.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class PolynomialFunctionLagrangeForm implements UnivariateRealFunction,
Serializable {
View
1 src/java/org/apache/commons/math/analysis/PolynomialFunctionNewtonForm.java
@@ -30,6 +30,7 @@
* Note that the length of a[] is one more than the length of c[]</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class PolynomialFunctionNewtonForm implements UnivariateRealFunction,
Serializable {
View
1 src/java/org/apache/commons/math/analysis/RiddersSolver.java
@@ -30,6 +30,7 @@
* The function should be continuous but not necessarily smooth.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class RiddersSolver extends UnivariateRealSolverImpl {
View
1 src/java/org/apache/commons/math/analysis/RombergIntegrator.java
@@ -30,6 +30,7 @@
* is a special case of k = 2.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class RombergIntegrator extends UnivariateRealIntegratorImpl {
View
1 src/java/org/apache/commons/math/analysis/SimpsonIntegrator.java
@@ -29,6 +29,7 @@
* calculate the Simpson's rule of alternating 2/3 and 4/3.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class SimpsonIntegrator extends UnivariateRealIntegratorImpl {
View
1 src/java/org/apache/commons/math/analysis/TrapezoidIntegrator.java
@@ -28,6 +28,7 @@
* The function should be integrable.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl {
View
1 src/java/org/apache/commons/math/analysis/UnivariateRealIntegrator.java
@@ -23,6 +23,7 @@
* Interface for univariate real integration algorithms.
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public interface UnivariateRealIntegrator {
View
1 src/java/org/apache/commons/math/analysis/UnivariateRealIntegratorImpl.java
@@ -22,6 +22,7 @@
* Provide a default implementation for several generic functions.
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public abstract class UnivariateRealIntegratorImpl implements
UnivariateRealIntegrator, Serializable {
View
11 src/java/org/apache/commons/math/complex/Complex.java
@@ -34,7 +34,6 @@
* or imaginary part - e.g., <pre>
* <code>1 + NaNi == NaN + i == NaN + NaNi.</code></pre></p>
*
- * @author Apache Software Foundation
* @version $Revision$ $Date$
*/
public class Complex implements Serializable {
@@ -57,10 +56,16 @@
/** A complex number representing "0.0 + 0.0i" */
public static final Complex ZERO = new Complex(0.0, 0.0);
- /** The imaginary part */
+ /**
+ * The imaginary part
+ * @deprecated to be made final and private in 2.0
+ */
protected double imaginary;
- /** The real part */
+ /**
+ * The real part
+ * @deprecated to be made final and private in 2.0
+ */
protected double real;
/**
View
28 src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
@@ -62,6 +62,34 @@ public double cumulativeProbability(double x) throws MathException {
/**
* For a random variable X whose values are distributed according
+ * to this distribution, this method returns P(x0 &le; X &le; x1).
+ *
+ * @param x0 the (inclusive) lower bound
+ * @param x1 the (inclusive) upper bound
+ * @return the probability that a random variable with this distribution
+ * will take a value between <code>x0</code> and <code>x1</code>,
+ * including the endpoints.
+ * @throws MathException if the cumulative probability can not be
+ * computed due to convergence or other numerical errors.
+ * @throws IllegalArgumentException if <code>x0 > x1</code>
+ */
+ public double cumulativeProbability(double x0, double x1)
+ throws MathException {
+ if (x0 > x1) {
+ throw new IllegalArgumentException
+ ("lower endpoint must be less than or equal to upper endpoint");
+ }
+ if (Math.floor(x0) < x0) {
+ return cumulativeProbability(((int) Math.floor(x0)) + 1,
+ (int) Math.floor(x1)); // don't want to count mass below x0
+ } else { // x0 is mathematical integer, so use as is
+ return cumulativeProbability((int) Math.floor(x0),
+ (int) Math.floor(x1));
+ }
+ }
+
+ /**
+ * For a random variable X whose values are distributed according
* to this distribution, this method returns P(X &le; x). In other words,
* this method represents the probability distribution function, or PDF,
* for this distribution.
View
1 src/java/org/apache/commons/math/estimation/AbstractEstimator.java
@@ -27,6 +27,7 @@
* <p>This base class handles the boilerplates methods associated to thresholds
* settings, jacobian and error estimation.</p>
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
public abstract class AbstractEstimator implements Estimator {
View
1 src/java/org/apache/commons/math/estimation/EstimatedParameter.java
@@ -28,6 +28,7 @@
* satisfy convergence criterions specific to each solver.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
1 src/java/org/apache/commons/math/estimation/EstimationException.java
@@ -23,6 +23,7 @@
* This class represents exceptions thrown by the estimation solvers.
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
1 src/java/org/apache/commons/math/estimation/EstimationProblem.java
@@ -39,6 +39,7 @@
* @see WeightedMeasurement
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
1 src/java/org/apache/commons/math/estimation/Estimator.java
@@ -31,6 +31,7 @@
* @see EstimationProblem
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
1 src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java
@@ -31,6 +31,7 @@
* Gauss-Newton algorithm.</p>
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
3 src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
@@ -94,7 +94,8 @@
* @author Jorge J. More (original fortran)
* @version $Revision$ $Date$
-
+ * @since 1.2
+ *
*/
public class LevenbergMarquardtEstimator extends AbstractEstimator implements Serializable {
View
1 src/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java
@@ -36,6 +36,7 @@
* various parameters and their current estimate.</p>
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class SimpleEstimationProblem implements EstimationProblem {
View
1 src/java/org/apache/commons/math/estimation/WeightedMeasurement.java
@@ -45,6 +45,7 @@
* @see EstimationProblem
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
36 src/java/org/apache/commons/math/fraction/Fraction.java
@@ -37,10 +37,10 @@
private static final long serialVersionUID = -8958519416450949235L;
/** The denominator. */
- private int denominator;
+ private final int denominator;
/** The numerator. */
- private int numerator;
+ private final int numerator;
/**
* Create a fraction given the double value.
@@ -210,9 +210,20 @@ public Fraction(int num, int den) {
num = -num;
den = -den;
}
+ // reduce numerator and denominator by greatest common denominator.
+ int d = MathUtils.gcd(num, den);
+ if (d > 1) {
+ num /= d;
+ den /= d;
+ }
+
+ // move sign to numerator.
+ if (den < 0) {
+ num *= -1;
+ den *= -1;
+ }
this.numerator = num;
this.denominator = den;
- reduce();
}
/**
@@ -531,23 +542,4 @@ public static Fraction getReducedFraction(int numerator, int denominator) {
denominator /= gcd;
return new Fraction(numerator, denominator);
}
-
- /**
- * Reduce this fraction to lowest terms. This is accomplished by dividing
- * both numerator and denominator by their greatest common divisor.
- */
- private void reduce() {
- // reduce numerator and denominator by greatest common denominator.
- int d = MathUtils.gcd(numerator, denominator);
- if (d > 1) {
- numerator /= d;
- denominator /= d;
- }
-
- // move sign to numerator.
- if (denominator < 0) {
- numerator *= -1;
- denominator *= -1;
- }
- }
}
View
1 src/java/org/apache/commons/math/fraction/FractionConversionException.java
@@ -24,6 +24,7 @@
* in the allowed number of iterations.
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class FractionConversionException extends ConvergenceException {
View
5 src/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java
@@ -23,12 +23,13 @@
* or Euler angles from a rotation.
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class CardanEulerSingularityException
extends MathException {
- /** Simple constructor.
+ /**
+ * Simple constructor.
* build an exception with a default message.
* @param isCardan if true, the rotation is related to Cardan angles,
* if false it is related to EulerAngles
View
10 src/java/org/apache/commons/math/geometry/NotARotationMatrixException.java
@@ -19,17 +19,19 @@
import org.apache.commons.math.MathException;
-/** This class represents exceptions thrown while building rotations
+/**
+ * This class represents exceptions thrown while building rotations
* from matrices.
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class NotARotationMatrixException
extends MathException {
- /** Simple constructor.
+ /**
+ * Simple constructor.
* Build an exception by translating and formating a message
* @param specifier format specifier (to be translated)
* @param parts to insert in the format (no translation)
View
12 src/java/org/apache/commons/math/geometry/Rotation.java
@@ -21,7 +21,7 @@
/**
* This class implements rotations in a three-dimensional space.
-
+ *
* <p>Rotations can be represented by several different mathematical
* entities (matrices, axe and angle, Cardan or Euler angles,
* quaternions). This class presents an higher level abstraction, more
@@ -59,14 +59,14 @@
* need to transform the observing direction in the topocentric frame into the
* observing direction in inertial frame taking into account the observatory
* location and the Earth rotation.</p>
-
+ *
* <p>These examples show that a rotation is what the user wants it to be, so this
* class does not push the user towards one specific definition and hence does not
* provide methods like <code>projectVectorIntoDestinationFrame</code> or
* <code>computeTransformedDirection</code>. It provides simpler and more generic
* methods: {@link #applyTo(Vector3D) applyTo(Vector3D)} and {@link
* #applyInverseTo(Vector3D) applyInverseTo(Vector3D)}.</p>
-
+ *
* <p>Since a rotation is basically a vectorial operator, several rotations can be
* composed together and the composite operation <code>r = r<sub>1</sub> o
* r<sub>2</sub></code> (which means that for each vector <code>u</code>,
@@ -77,13 +77,13 @@
* we get is <code>r = r<sub>1</sub> o r<sub>2</sub></code>. For this purpose, the
* class provides the methods: {@link #applyTo(Rotation) applyTo(Rotation)} and
* {@link #applyInverseTo(Rotation) applyInverseTo(Rotation)}.</p>
-
+ *
* <p>Rotations are guaranteed to be immutable objects.</p>
-
+ *
* @version $Revision$ $Date$
* @see Vector3D
* @see RotationOrder
-
+ * @since 1.2
*/
public class Rotation implements Serializable {
View
6 src/java/org/apache/commons/math/geometry/RotationOrder.java
@@ -20,14 +20,14 @@
/**
* This class is a utility representing a rotation order specification
* for Cardan or Euler angles specification.
-
+ *
* This class cannot be instanciated by the user. He can only use one
* of the twelve predefined supported orders as an argument to either
* the {@link Rotation#Rotation(RotationOrder,double,double,double)}
* constructor or the {@link Rotation#getAngles} method.
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public final class RotationOrder {
View
4 src/java/org/apache/commons/math/geometry/Vector3D.java
@@ -19,9 +19,11 @@
import java.io.Serializable;
-/** This class implements vectors in a three-dimensional space.
+/**
+ * This class implements vectors in a three-dimensional space.
* <p>Instance of this class are guaranteed to be immutable.</p>
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class Vector3D
View
2 src/java/org/apache/commons/math/linear/MatrixUtils.java
@@ -27,7 +27,7 @@
public class MatrixUtils {
/**
- * Default constructor. Package scope to prevent unwanted instantiation.
+ * Default constructor.
*/
public MatrixUtils() {
super();
View
2 src/java/org/apache/commons/math/linear/QRDecomposition.java
@@ -23,8 +23,8 @@
*
* @see <a href="http://mathworld.wolfram.com/QRDecomposition.html">MathWorld</a>
* @see <a href="http://en.wikipedia.org/wiki/QR_decomposition">Wikipedia</a>
- *
* @version $Revision$ $Date$
+ * @since 1.2
*/
public interface QRDecomposition {
View
4 src/java/org/apache/commons/math/linear/QRDecompositionImpl.java
@@ -23,13 +23,13 @@
* orthogonal (Q<sup>T</sup>Q = I), and R is upper triangular. If A is
* m&times;n, Q is m&times;m and R m&times;n.
* <p>
- * Implemented using Householder reflectors.
- *
+ * Implemented using Householder reflectors.</p>
*
* @see <a href="http://mathworld.wolfram.com/QRDecomposition.html">MathWorld</a>
* @see <a href="http://en.wikipedia.org/wiki/QR_decomposition">Wikipedia</a>
*
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class QRDecompositionImpl implements QRDecomposition {
View
1 src/java/org/apache/commons/math/ode/AbstractStepInterpolator.java
@@ -34,6 +34,7 @@
* @see StepHandler
*
* @version $Revision$ $Date$
+ * @since 1.2
*
*/
View
11 src/java/org/apache/commons/math/ode/AdaptiveStepsizeIntegrator.java
@@ -20,7 +20,7 @@
/**
* This abstract class holds the common part of all adaptive
* stepsize integrators for Ordinary Differential Equations.
-
+ *
* <p>These algorithms perform integration with stepsize control, which
* means the user does not specify the integration step but rather a
* tolerance on error. The error threshold is computed as
@@ -31,18 +31,19 @@
* state vector and relTol_i is the relative tolerance for the same
* component. The user can also use only two scalar values absTol and
* relTol which will be used for all components.</p>
-
+ *
* <p>If the estimated error for ym+1 is such that
* <pre>
* sqrt((sum (errEst_i / threshold_i)^2 ) / n) < 1
* </pre>
-
+ *
* (where n is the state vector dimension) then the step is accepted,
* otherwise the step is rejected and a new attempt is made with a new
* stepsize.</p>
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
+ *
*/
public abstract class AdaptiveStepsizeIntegrator
View
7 src/java/org/apache/commons/math/ode/ClassicalRungeKuttaIntegrator.java
@@ -21,7 +21,7 @@
* This class implements the classical fourth order Runge-Kutta
* integrator for Ordinary Differential Equations (it is the most
* often used Runge-Kutta method).
-
+ *
* <p>This method is an explicit Runge-Kutta method, its Butcher-array
* is the following one :
* <pre>
@@ -33,14 +33,13 @@
* | 1/6 1/3 1/3 1/6
* </pre>
* </p>
-
+ *
* @see EulerIntegrator
* @see GillIntegrator
* @see MidpointIntegrator
* @see ThreeEighthesIntegrator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class ClassicalRungeKuttaIntegrator
View
9 src/java/org/apache/commons/math/ode/ClassicalRungeKuttaStepInterpolator.java
@@ -20,7 +20,7 @@
/**
* This class implements a step interpolator for the classical fourth
* order Runge-Kutta integrator.
-
+ *
* <p>This interpolator allows to compute dense output inside the last
* step computed. The interpolation equation is consistent with the
* integration scheme :
@@ -32,15 +32,14 @@
* -(4 theta^2 + theta + 1) y'_4
* ]
* </pre>
-
+ *
* where theta belongs to [0 ; 1] and where y'_1 to y'_4 are the four
* evaluations of the derivatives already computed during the
* step.</p>
-
+ *
* @see ClassicalRungeKuttaIntegrator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
class ClassicalRungeKuttaStepInterpolator
View
15 src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
@@ -25,7 +25,7 @@
* This class stores all information provided by an ODE integrator
* during the integration process and build a continuous model of the
* solution from this.
-
+ *
* <p>This class act as a step handler from the integrator point of
* view. It is called iteratively during the integration process and
* stores a copy of all steps information in a sorted collection for
@@ -36,14 +36,14 @@
* integration to be over before attempting to call {@link
* #setInterpolatedTime setInterpolatedTime} because some internal
* variables are set only once the last step has been handled.</p>
-
+ *
* <p>This is useful for example if the main loop of the user
* application should remain independent from the integration process
* or if one needs to mimic the behaviour of an analytical model
* despite a numerical model is used (i.e. one needs the ability to
* get the model value at any time or to navigate through the
* data).</p>
-
+ *
* <p>If problem modelization is done with several separate
* integration phases for contiguous intervals, the same
* ContinuousOutputModel can be used as step handler for all
@@ -57,26 +57,25 @@
* output model handles the steps of all integration phases, the user
* do not need to bother when the maneuver begins or ends, he has all
* the data available in a transparent manner.</p>
-
+ *
* <p>An important feature of this class is that it implements the
* <code>Serializable</code> interface. This means that the result of
* an integration can be serialized and reused later (if stored into a
* persistent medium like a filesystem or a database) or elsewhere (if
* sent to another application). Only the result of the integration is
* stored, there is no reference to the integrated problem by
* itself.</p>
-
+ *
* <p>One should be aware that the amount of data stored in a
* ContinuousOutputModel instance can be important if the state vector
* is large, if the integration interval is long or if the steps are
* small (which can result from small tolerance settings in {@link
* AdaptiveStepsizeIntegrator adaptive step size integrators}).</p>
-
+ *
* @see StepHandler
* @see StepInterpolator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class ContinuousOutputModel
View
1 src/java/org/apache/commons/math/ode/DerivativeException.java
@@ -24,6 +24,7 @@
* the error conditions that are trigegred while computing
* the differential equations.
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class DerivativeException
extends MathException {
View
6 src/java/org/apache/commons/math/ode/DormandPrince54Integrator.java
@@ -29,7 +29,7 @@
* is an <i>fsal</i>, the last evaluation of one step is the same as
* the first evaluation of the next step and hence can be avoided. So
* the cost is really 6 functions evaluations per step.</p>
-
+ *
* <p>This method has been published (whithout the continuous output
* that was added by Shampine in 1986) in the following article :
* <pre>
@@ -38,9 +38,9 @@
* Journal of Computational and Applied Mathematics
* volume 6, no 1, 1980, pp. 19-26
* </pre></p>
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class DormandPrince54Integrator
View
2 src/java/org/apache/commons/math/ode/DormandPrince54StepInterpolator.java
@@ -24,7 +24,7 @@
* @see DormandPrince54Integrator
*
* @version $Revision$ $Date$
- *
+ * @since 1.2
*/
class DormandPrince54StepInterpolator
View
8 src/java/org/apache/commons/math/ode/DormandPrince853Integrator.java
@@ -20,7 +20,7 @@
/**
* This class implements the 8(5,3) Dormand-Prince integrator for Ordinary
* Differential Equations.
-
+ *
* <p>This integrator is an embedded Runge-Kutta integrator
* of order 8(5,3) used in local extrapolation mode (i.e. the solution
* is computed using the high order formula) with stepsize control
@@ -33,7 +33,7 @@
* <i>fsal</i>. Hence, despite we have 13 stages here, the cost is
* really 12 evaluations per step even if no interpolation is done,
* and the overcost of interpolation is only 3 evaluations.</p>
-
+ *
* <p>This method is based on an 8(6) method by Dormand and Prince
* (i.e. order 8 for the integration and order 6 for error estimation)
* modified by Hairer and Wanner to use a 5th order error estimator
@@ -46,9 +46,9 @@
* Problems) of the reference book by Hairer, Norsett and Wanner:
* <i>Solving Ordinary Differential Equations</i> (Springer-Verlag,
* ISBN 3-540-56670-8).</p>
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class DormandPrince853Integrator
View
2 src/java/org/apache/commons/math/ode/DormandPrince853StepInterpolator.java
@@ -28,7 +28,7 @@
* @see DormandPrince853Integrator
*
* @version $Revision$ $Date$
- *
+ * @since 1.2
*/
class DormandPrince853StepInterpolator
View
7 src/java/org/apache/commons/math/ode/DummyStepHandler.java
@@ -25,16 +25,15 @@
* <p>This class is provided as a convenience for users who are only
* interested in the final state of an integration and not in the
* intermediate steps. Its handleStep method does nothing.</p>
-
+ *
* <p>Since this class has no internal state, it is implemented using
* the Singleton design pattern. This means that only one instance is
* ever created, which can be retrieved using the getInstance
* method. This explains why there is no public constructor.</p>
-
+ *
* @see StepHandler
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class DummyStepHandler
View
2 src/java/org/apache/commons/math/ode/DummyStepInterpolator.java
@@ -32,7 +32,7 @@
* @see StepHandler
*
* @version $Revision$ $Date$
- *
+ * @since 1.2
*/
public class DummyStepInterpolator
View
10 src/java/org/apache/commons/math/ode/EmbeddedRungeKuttaIntegrator.java
@@ -20,7 +20,7 @@
/**
* This class implements the common part of all embedded Runge-Kutta
* integrators for Ordinary Differential Equations.
-
+ *
* <p>These methods are embedded explicit Runge-Kutta methods with two
* sets of coefficients allowing to estimate the error, their Butcher
* arrays are as follows :
@@ -35,11 +35,11 @@
* | b'1 b'2 ... b's-1 b's
* </pre>
* </p>
-
+ *
* <p>In fact, we rather use the array defined by ej = bj - b'j to
* compute directly the error rather than computing two estimates and
* then comparing them.</p>
-
+ *
* <p>Some methods are qualified as <i>fsal</i> (first same as last)
* methods. This means the last evaluation of the derivatives in one
* step is the same as the first in the next step. Then, this
@@ -49,9 +49,9 @@
* the step is rejected after the error estimation phase, no
* evaluation is saved. For an <i>fsal</i> method, we have cs = 1 and
* asi = bi for all i.</p>
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public abstract class EmbeddedRungeKuttaIntegrator
View
11 src/java/org/apache/commons/math/ode/EulerIntegrator.java
@@ -20,30 +20,29 @@
/**
* This class implements a simple Euler integrator for Ordinary
* Differential Equations.
-
+ *
* <p>The Euler algorithm is the simplest one that can be used to
* integrate ordinary differential equations. It is a simple inversion
* of the forward difference expression :
* <code>f'=(f(t+h)-f(t))/h</code> which leads to
* <code>f(t+h)=f(t)+hf'</code>. The interpolation scheme used for
* dense output is the linear scheme already used for integration.</p>
-
+ *
* <p>This algorithm looks cheap because it needs only one function
* evaluation per step. However, as it uses linear estimates, it needs
* very small steps to achieve high accuracy, and small steps lead to
* numerical errors and instabilities.</p>
-
+ *
* <p>This algorithm is almost never used and has been included in
* this package only as a comparison reference for more useful
* integrators.</p>
-
+ *
* @see MidpointIntegrator
* @see ClassicalRungeKuttaIntegrator
* @see GillIntegrator
* @see ThreeEighthesIntegrator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class EulerIntegrator
View
11 src/java/org/apache/commons/math/ode/EulerStepInterpolator.java
@@ -19,22 +19,21 @@
/**
* This class implements a linear interpolator for step.
-
+ *
* <p>This interpolator allow to compute dense output inside the last
* step computed. The interpolation equation is consistent with the
* integration scheme :
-
+ *
* <pre>
* y(t_n + theta h) = y (t_n + h) - (1-theta) h y'
* </pre>
-
+ *
* where theta belongs to [0 ; 1] and where y' is the evaluation of
* the derivatives already computed during the step.</p>
-
+ *
* @see EulerIntegrator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
class EulerStepInterpolator
View
11 src/java/org/apache/commons/math/ode/FirstOrderConverter.java
@@ -19,19 +19,19 @@
/** This class converts second order differential equations to first
* order ones.
-
+ *
* <p>This class is a wrapper around a {@link
* SecondOrderDifferentialEquations} which allow to use a {@link
* FirstOrderIntegrator} to integrate it.</p>
-
+ *
* <p>The transformation is done by changing the n dimension state
* vector to a 2n dimension vector, where the first n components are
* the initial state variables and the n last components are their
* first time derivative. The first time derivative of this state
* vector then really contains both the first and second time
* derivative of the initial state vector, which can be handled by the
* underlying second order equations set.</p>
-
+ *
* <p>One should be aware that the data is duplicated during the
* transformation process and that for each call to {@link
* #computeDerivatives computeDerivatives}, this wrapper does copy 4n
@@ -45,13 +45,12 @@
* avoid this duplication is to perform the transformation at the
* problem level, i.e. to implement the problem as a first order one
* and then avoid using this class.</p>
-
+ *
* @see FirstOrderIntegrator
* @see FirstOrderDifferentialEquations
* @see SecondOrderDifferentialEquations
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class FirstOrderConverter
View
2 src/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java
@@ -41,7 +41,7 @@
* @see SecondOrderDifferentialEquations
*
* @version $Revision$ $Date$
- *
+ * @since 1.2
*/
public interface FirstOrderDifferentialEquations {
View
5 src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
@@ -24,13 +24,12 @@
* equations should implement this interface. The problems which can
* be handled should implement the {@link
* FirstOrderDifferentialEquations} interface.</p>
-
+ *
* @see FirstOrderDifferentialEquations
* @see StepHandler
* @see SwitchingFunction
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public interface FirstOrderIntegrator {
View
5 src/java/org/apache/commons/math/ode/FixedStepHandler.java
@@ -29,12 +29,11 @@
* {@link StepNormalizer} object is called according to the integrator
* internal algorithms and it calls objects implementing this
* interface as necessary at fixed time steps.</p>
-
+ *
* @see StepHandler
* @see StepNormalizer
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public interface FixedStepHandler {
View
5 src/java/org/apache/commons/math/ode/GillIntegrator.java
@@ -32,14 +32,13 @@
* | 1/6 (2-q)/6 (2+q)/6 1/6
* </pre>
* where q = sqrt(2)</p>
-
+ *
* @see EulerIntegrator
* @see ClassicalRungeKuttaIntegrator
* @see MidpointIntegrator
* @see ThreeEighthesIntegrator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class GillIntegrator
View
9 src/java/org/apache/commons/math/ode/GillStepInterpolator.java
@@ -20,11 +20,11 @@
/**
* This class implements a step interpolator for the Gill fourth
* order Runge-Kutta integrator.
-
+ *
* <p>This interpolator allows to compute dense output inside the last
* step computed. The interpolation equation is consistent with the
* integration scheme :
-
+ *
* <pre>
* y(t_n + theta h) = y (t_n + h)
* - (1 - theta) (h/6) [ (1 - theta) (1 - 4 theta) y'_1
@@ -35,11 +35,10 @@
* where theta belongs to [0 ; 1], q = sqrt(2) and where y'_1 to y'_4
* are the four evaluations of the derivatives already computed during
* the step.</p>
-
+ *
* @see GillIntegrator
-
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
class GillStepInterpolator
View
16 src/java/org/apache/commons/math/ode/GraggBulirschStoerIntegrator.java
@@ -20,12 +20,12 @@
/**
* This class implements a Gragg-Bulirsch-Stoer integrator for
* Ordinary Differential Equations.
-
+ *
* <p>The Gragg-Bulirsch-Stoer algorithm is one of the most efficient
* ones currently available for smooth problems. It uses Richardson
* extrapolation to estimate what would be the solution if the step
* size could be decreased down to zero.</p>
-
+ *
* <p>
* This method changes both the step size and the order during
* integration, in order to minimize computation cost. It is
@@ -41,7 +41,7 @@
* bodies (pleiades problem, involving quasi-collisions for which
* <i>automatic step size control is essential</i>).
* </p>
-
+ *
* <p>
* This implementation is basically a reimplementation in Java of the
* <a
@@ -51,10 +51,10 @@
* href="http://www.unige.ch/~hairer/prog/licence.txt">here</a>, for
* convenience, it is reproduced below.</p>
* </p>
-
+ *
* <table border="0" width="80%" cellpadding="10" align="center" bgcolor="#E0E0E0">
* <tr><td>Copyright (c) 2004, Ernst Hairer</td></tr>
-
+ *
* <tr><td>Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
@@ -65,7 +65,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.</li>
* </ul></td></tr>
-
+ *
* <tr><td><strong>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -78,10 +78,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</strong></td></tr>
* </table>
-
+ *
* @author E. Hairer and G. Wanner (fortran version)
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class GraggBulirschStoerIntegrator
View
15 src/java/org/apache/commons/math/ode/GraggBulirschStoerStepInterpolator.java
@@ -24,10 +24,10 @@
/**
* This class implements an interpolator for the Gragg-Bulirsch-Stoer
* integrator.
-
+ *
* <p>This interpolator compute dense output inside the last step
* produced by a Gragg-Bulirsch-Stoer integrator.</p>
-
+ *
* <p>
* This implementation is basically a reimplementation in Java of the
* <a
@@ -37,10 +37,10 @@
* href="http://www.unige.ch/~hairer/prog/licence.txt">here</a>, for
* convenience, it is reproduced below.</p>
* </p>
-
+ *
* <table border="0" width="80%" cellpadding="10" align="center" bgcolor="#E0E0E0">
* <tr><td>Copyright (c) 2004, Ernst Hairer</td></tr>
-
+ *
* <tr><td>Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
@@ -51,7 +51,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.</li>
* </ul></td></tr>
-
+ *
* <tr><td><strong>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -64,12 +64,11 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</strong></td></tr>
* </table>
-
+ *
* @see GraggBulirschStoerIntegrator
-
* @version $Revision$ $Date$
* @author E. Hairer and G. Wanner (fortran version)
-
+ * @since 1.2
*/
class GraggBulirschStoerStepInterpolator
View
6 src/java/org/apache/commons/math/ode/HighamHall54Integrator.java
@@ -20,15 +20,15 @@
/**
* This class implements the 5(4) Higham and Hall integrator for
* Ordinary Differential Equations.
-
+ *
* <p>This integrator is an embedded Runge-Kutta integrator
* of order 5(4) used in local extrapolation mode (i.e. the solution
* is computed using the high order formula) with stepsize control
* (and automatic step initialization) and continuous output. This
* method uses 7 functions evaluations per step.</p>
-
+ *
* @version $Revision$ $Date$
-
+ * @since 1.2
*/
public class HighamHall54Integrator
View
2 src/java/org/apache/commons/math/ode/HighamHall54StepInterpolator.java
@@ -24,7 +24,7 @@
* @see HighamHall54Integrator
*
* @version $Revision$ $Date$
- *
+ * @since 1.2
*/
class HighamHall54StepInterpolator
View
1 src/java/org/apache/commons/math/ode/IntegratorException.java
@@ -23,6 +23,7 @@
* This exception is made available to users to report
* the error conditions that are triggered during integration
* @version $Revision$ $Date$
+ * @since 1.2
*/
public class IntegratorException
extends MathException {
View
8 src/java/org/apache/commons/math/ode/MidpointIntegrator.java
@@ -20,7 +20,7 @@
/**