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 17:32:51 UTC

svn commit: r811827 [1/2] - in /commons/proper/math/trunk: ./ src/main/java/org/apache/commons/math/ src/main/java/org/apache/commons/math/analysis/interpolation/ src/main/java/org/apache/commons/math/analysis/solvers/ src/main/java/org/apache/commons/...

Author: luc
Date: Sun Sep  6 15:32:50 2009
New Revision: 811827

URL: http://svn.apache.org/viewvc?rev=811827&view=rev
Log:
use standard declaration order rules

Modified:
    commons/proper/math/trunk/checkstyle.xml
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/DimensionMismatchException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/MessagesResources_fr.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/ComplexField.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimatedParameter.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/FractionField.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/geometry/CardanEulerSingularityException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/NotARotationMatrixException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/RotationOrder.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/ArrayFieldVector.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockFieldMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockRealMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/DummyStepHandler.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/DummyStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.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/optimization/linear/SimplexTableau.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/CorrelatedRandomVectorGenerator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/GaussianRandomGenerator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/UncorrelatedRandomVectorGenerator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/UniformRandomGenerator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/ValueServer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Gamma.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/GeometricMean.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TestUtils.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/util/BigReal.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/BigRealField.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java

Modified: commons/proper/math/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/checkstyle.xml?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/checkstyle.xml (original)
+++ commons/proper/math/trunk/checkstyle.xml Sun Sep  6 15:32:50 2009
@@ -116,8 +116,10 @@
     <module name="RedundantModifier" />
     <module name="ModifierOrder" />
 
-    <!--
+    <!-- Use a consistent way to put declarations -->
     <module name="DeclarationOrder" />
+
+    <!--
     <module name="IllegalCatch" />
     <module name="StringLiteralEquality" />
     <module name="MultipleStringLiterals" />
@@ -144,6 +146,11 @@
     <property name="onCommentFormat"  value="CHECKSTYLE\: resume ConstantName"/>
     <property name="checkFormat"      value="ConstantName"/>
   </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop HideUtilityClassConstructor"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume HideUtilityClassConstructor"/>
+    <property name="checkFormat"      value="HideUtilityClassConstructor"/>
+  </module>
 
 </module>
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/DimensionMismatchException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/DimensionMismatchException.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/DimensionMismatchException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/DimensionMismatchException.java Sun Sep  6 15:32:50 2009
@@ -27,12 +27,18 @@
     /** Serializable version identifier */
     private static final long serialVersionUID = -1316089546353786411L;
 
+    /** First dimension. */
+    private final int dimension1;
+
+    /** Second dimension. */
+    private final int dimension2;
+
     /**
      * Construct an exception from the mismatched dimensions
      * @param dimension1 first dimension
      * @param dimension2 second dimension
      */
-    public DimensionMismatchException(int dimension1, int dimension2) {
+    public DimensionMismatchException(final int dimension1, final int dimension2) {
         super("dimension mismatch {0} != {1}", dimension1, dimension2);
         this.dimension1 = dimension1;
         this.dimension2 = dimension2;
@@ -54,10 +60,4 @@
         return dimension2;
     }
 
-    /** First dimension. */
-    private int dimension1;
-
-    /** Second dimension. */
-    private int dimension2;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java Sun Sep  6 15:32:50 2009
@@ -49,43 +49,6 @@
     private final Object[] arguments;
 
     /**
-     * Translate a string to a given locale.
-     * @param s string to translate
-     * @param locale locale into which to translate the string
-     * @return translated string or original string
-     * for unsupported locales or unknown strings
-     */
-    private static String translate(String s, Locale locale) {
-        try {
-            ResourceBundle bundle =
-                    ResourceBundle.getBundle("org.apache.commons.math.MessagesResources", locale);
-            if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
-                // the value of the resource is the translated string
-                return bundle.getString(s);
-            }
-
-        } catch (MissingResourceException mre) {
-            // do nothing here
-        }
-
-        // the locale is not supported or the resource is unknown
-        // don't translate and fall back to using the string as is
-        return s;
-
-    }
-
-    /**
-     * Builds a message string by from a pattern and its arguments.
-     * @param locale Locale in which the message should be translated
-     * @param pattern format specifier
-     * @param arguments format arguments
-     * @return a message string
-     */
-    private static String buildMessage(Locale locale, String pattern, Object ... arguments) {
-        return (pattern == null) ? "" : new MessageFormat(translate(pattern, locale), locale).format(arguments);
-    }
-
-    /**
      * Constructs a new <code>MathException</code> with no
      * detail message.
      */
@@ -137,6 +100,43 @@
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
 
+    /**
+     * Translate a string to a given locale.
+     * @param s string to translate
+     * @param locale locale into which to translate the string
+     * @return translated string or original string
+     * for unsupported locales or unknown strings
+     */
+    private static String translate(String s, Locale locale) {
+        try {
+            ResourceBundle bundle =
+                    ResourceBundle.getBundle("org.apache.commons.math.MessagesResources", locale);
+            if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
+                // the value of the resource is the translated string
+                return bundle.getString(s);
+            }
+
+        } catch (MissingResourceException mre) {
+            // do nothing here
+        }
+
+        // the locale is not supported or the resource is unknown
+        // don't translate and fall back to using the string as is
+        return s;
+
+    }
+
+    /**
+     * Builds a message string by from a pattern and its arguments.
+     * @param locale Locale in which the message should be translated
+     * @param pattern format specifier
+     * @param arguments format arguments
+     * @return a message string
+     */
+    private static String buildMessage(Locale locale, String pattern, Object ... arguments) {
+        return (pattern == null) ? "" : new MessageFormat(translate(pattern, locale), locale).format(arguments);
+    }
+
     /** Gets the pattern used to build the message of this throwable.
      *
      * @return the pattern used to build the message of this throwable

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java Sun Sep  6 15:32:50 2009
@@ -50,44 +50,6 @@
     private final Object[] arguments;
 
     /**
-     * Translate a string to a given locale.
-     * @param s string to translate
-     * @param locale locale into which to translate the string
-     * @return translated string or original string
-     * for unsupported locales or unknown strings
-     */
-    private static String translate(final String s, final Locale locale) {
-        try {
-            ResourceBundle bundle =
-                    ResourceBundle.getBundle("org.apache.commons.math.MessagesResources", locale);
-            if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
-                // the value of the resource is the translated string
-                return bundle.getString(s);
-            }
-
-        } catch (MissingResourceException mre) {
-            // do nothing here
-        }
-
-        // the locale is not supported or the resource is unknown
-        // don't translate and fall back to using the string as is
-        return s;
-
-    }
-
-    /**
-     * Builds a message string by from a pattern and its arguments.
-     * @param locale Locale in which the message should be translated
-     * @param pattern format specifier
-     * @param arguments format arguments
-     * @return a message string
-     */
-    private static String buildMessage(final Locale locale, final String pattern,
-                                       final Object ... arguments) {
-        return (pattern == null) ? "" : new MessageFormat(translate(pattern, locale), locale).format(arguments);
-    }
-
-    /**
      * Constructs a new <code>MathRuntimeException</code> with specified
      * formatted detail message.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
@@ -129,6 +91,44 @@
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
 
+    /**
+     * Translate a string to a given locale.
+     * @param s string to translate
+     * @param locale locale into which to translate the string
+     * @return translated string or original string
+     * for unsupported locales or unknown strings
+     */
+    private static String translate(final String s, final Locale locale) {
+        try {
+            ResourceBundle bundle =
+                    ResourceBundle.getBundle("org.apache.commons.math.MessagesResources", locale);
+            if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
+                // the value of the resource is the translated string
+                return bundle.getString(s);
+            }
+
+        } catch (MissingResourceException mre) {
+            // do nothing here
+        }
+
+        // the locale is not supported or the resource is unknown
+        // don't translate and fall back to using the string as is
+        return s;
+
+    }
+
+    /**
+     * Builds a message string by from a pattern and its arguments.
+     * @param locale Locale in which the message should be translated
+     * @param pattern format specifier
+     * @param arguments format arguments
+     * @return a message string
+     */
+    private static String buildMessage(final Locale locale, final String pattern,
+                                       final Object ... arguments) {
+        return (pattern == null) ? "" : new MessageFormat(translate(pattern, locale), locale).format(arguments);
+    }
+
     /** Gets the pattern used to build the message of this throwable.
      *
      * @return the pattern used to build the message of this throwable

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/MessagesResources_fr.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/MessagesResources_fr.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/MessagesResources_fr.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/MessagesResources_fr.java Sun Sep  6 15:32:50 2009
@@ -27,21 +27,6 @@
 public class MessagesResources_fr
   extends ListResourceBundle {
 
-  /**
-   * Simple constructor.
-   */
-  public MessagesResources_fr() {
-  }
-
-  /**
-   * Get the non-translated/translated messages arrays from this resource bundle.
-   * @return non-translated/translated messages arrays
-   */
-  @Override
-  public Object[][] getContents() {
-    return CONTENTS.clone();
-  }
-
   /** Non-translated/translated messages arrays. */
   private static final Object[][] CONTENTS = {
 
@@ -854,4 +839,19 @@
 
   };
 
+  /**
+   * Simple constructor.
+   */
+  public MessagesResources_fr() {
+  }
+
+  /**
+   * Get the non-translated/translated messages arrays from this resource bundle.
+   * @return non-translated/translated messages arrays
+   */
+  @Override
+  public Object[][] getContents() {
+    return CONTENTS.clone();
+  }
+
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java Sun Sep  6 15:32:50 2009
@@ -41,18 +41,15 @@
 public class LoessInterpolator
         implements UnivariateRealInterpolator, Serializable {
 
-    /** serializable version identifier. */
-    private static final long serialVersionUID = 5204927143605193821L;
-
-    /**
-     * Default value of the bandwidth parameter.
-     */
+    /** Default value of the bandwidth parameter. */
     public static final double DEFAULT_BANDWIDTH = 0.3;
-    /**
-     * Default value of the number of robustness iterations.
-     */
+
+    /** Default value of the number of robustness iterations. */
     public static final int DEFAULT_ROBUSTNESS_ITERS = 2;
 
+    /** serializable version identifier. */
+    private static final long serialVersionUID = 5204927143605193821L;
+
     /**
      * The bandwidth parameter: when computing the loess fit at
      * a particular point, this fraction of source points closest

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java Sun Sep  6 15:32:50 2009
@@ -229,19 +229,14 @@
         }
     }
 
+    // CHECKSTYLE: stop HideUtilityClassConstructor
     /** Holder for the factory.
      * <p>We use here the Initialization On Demand Holder Idiom.</p>
      */
     private static class LazyHolder {
-
-        /** Private constructor. */
-        private LazyHolder() {
-        }
-
         /** Cached solver factory */
-        private static final UnivariateRealSolverFactory FACTORY =
-            UnivariateRealSolverFactory.newInstance();
-
+        private static final UnivariateRealSolverFactory FACTORY = UnivariateRealSolverFactory.newInstance();
     }
+    // CHECKSTYLE: resume HideUtilityClassConstructor
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java Sun Sep  6 15:32:50 2009
@@ -45,9 +45,6 @@
  */
 public class Complex implements FieldElement<Complex>, Serializable  {
 
-    /** Serializable version identifier */
-    private static final long serialVersionUID = -6195664516687396620L;
-
     /** The square root of -1. A number representing "0.0 + 1.0i" */
     public static final Complex I = new Complex(0.0, 1.0);
 
@@ -65,24 +62,19 @@
     /** A complex number representing "0.0 + 0.0i" */
     public static final Complex ZERO = new Complex(0.0, 0.0);
 
-    /**
-     * The imaginary part
-     */
+    /** Serializable version identifier */
+    private static final long serialVersionUID = -6195664516687396620L;
+
+    /** The imaginary part. */
     private final double imaginary;
 
-    /**
-     * The real part
-     */
+    /** The real part. */
     private final double real;
 
-    /**
-     * Record whether this complex number is equal to NaN
-     */
+    /** Record whether this complex number is equal to NaN. */
     private final transient boolean isNaN;
 
-    /**
-     * Record whether this complex number is infinite
-     */
+    /** Record whether this complex number is infinite. */
     private final transient boolean isInfinite;
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/ComplexField.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/ComplexField.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/ComplexField.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/ComplexField.java Sun Sep  6 15:32:50 2009
@@ -57,19 +57,15 @@
         return Complex.ZERO;
     }
 
+    // CHECKSTYLE: stop HideUtilityClassConstructor
     /** Holder for the instance.
      * <p>We use here the Initialization On Demand Holder Idiom.</p>
      */
     private static class LazyHolder {
-
-        /** Private constructor. */
-        private LazyHolder() {
-        }
-
         /** Cached field instance. */
         private static final ComplexField INSTANCE = new ComplexField();
-
     }
+    // CHECKSTYLE: resume HideUtilityClassConstructor
 
     /** Handle deserialization of the singleton.
      * @return the singleton instance

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java Sun Sep  6 15:32:50 2009
@@ -40,6 +40,47 @@
     /** Default maximal number of cost evaluations allowed. */
     public static final int DEFAULT_MAX_COST_EVALUATIONS = 100;
 
+    /** Array of measurements. */
+    protected WeightedMeasurement[] measurements;
+
+    /** Array of parameters. */
+    protected EstimatedParameter[] parameters;
+
+    /**
+     * Jacobian matrix.
+     * <p>This matrix is in canonical form just after the calls to
+     * {@link #updateJacobian()}, but may be modified by the solver
+     * in the derived class (the {@link LevenbergMarquardtEstimator
+     * Levenberg-Marquardt estimator} does this).</p>
+     */
+    protected double[] jacobian;
+
+    /** Number of columns of the jacobian matrix. */
+    protected int cols;
+
+    /** Number of rows of the jacobian matrix. */
+    protected int rows;
+
+    /** Residuals array.
+     * <p>This array is in canonical form just after the calls to
+     * {@link #updateJacobian()}, but may be modified by the solver
+     * in the derived class (the {@link LevenbergMarquardtEstimator
+     * Levenberg-Marquardt estimator} does this).</p>
+     */
+    protected double[] residuals;
+
+    /** Cost value (square root of the sum of the residuals). */
+    protected double cost;
+
+    /** Maximal allowed number of cost evaluations. */
+    private int maxCostEval;
+
+    /** Number of cost evaluations. */
+    private int costEvaluations;
+
+    /** Number of jacobian evaluations. */
+    private int jacobianEvaluations;
+
     /**
      * Build an abstract estimator for least squares problems.
      * <p>The maximal number of cost evaluations allowed is set
@@ -270,45 +311,4 @@
     public abstract void estimate(EstimationProblem problem)
     throws EstimationException;
 
-    /** Array of measurements. */
-    protected WeightedMeasurement[] measurements;
-
-    /** Array of parameters. */
-    protected EstimatedParameter[] parameters;
-
-    /**
-     * Jacobian matrix.
-     * <p>This matrix is in canonical form just after the calls to
-     * {@link #updateJacobian()}, but may be modified by the solver
-     * in the derived class (the {@link LevenbergMarquardtEstimator
-     * Levenberg-Marquardt estimator} does this).</p>
-     */
-    protected double[] jacobian;
-
-    /** Number of columns of the jacobian matrix. */
-    protected int cols;
-
-    /** Number of rows of the jacobian matrix. */
-    protected int rows;
-
-    /** Residuals array.
-     * <p>This array is in canonical form just after the calls to
-     * {@link #updateJacobian()}, but may be modified by the solver
-     * in the derived class (the {@link LevenbergMarquardtEstimator
-     * Levenberg-Marquardt estimator} does this).</p>
-     */
-    protected double[] residuals;
-
-    /** Cost value (square root of the sum of the residuals). */
-    protected double cost;
-
-    /** Maximal allowed number of cost evaluations. */
-    private int maxCostEval;
-
-    /** Number of cost evaluations. */
-    private int costEvaluations;
-
-    /** Number of jacobian evaluations. */
-    private int jacobianEvaluations;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimatedParameter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimatedParameter.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimatedParameter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimatedParameter.java Sun Sep  6 15:32:50 2009
@@ -37,90 +37,90 @@
 public class EstimatedParameter
   implements Serializable {
 
-  /** Simple constructor.
-   * Build an instance from a first estimate of the parameter,
-   * initially considered unbound.
-   * @param name name of the parameter
-   * @param firstEstimate first estimate of the parameter
-   */
-  public EstimatedParameter(String name, double firstEstimate) {
-    this.name = name;
-    estimate  = firstEstimate;
-    bound     = false;
-  }
-
-  /** Simple constructor.
-   * Build an instance from a first estimate of the parameter and a
-   * bound flag
-   * @param name name of the parameter
-   * @param firstEstimate first estimate of the parameter
-   * @param bound flag, should be true if the parameter is bound
-   */
-  public EstimatedParameter(String name,
-                            double firstEstimate,
-                            boolean bound) {
-    this.name  = name;
-    estimate   = firstEstimate;
-    this.bound = bound;
-  }
-
-  /** Copy constructor.
-   * Build a copy of a parameter
-   * @param parameter instance to copy
-   */
-  public EstimatedParameter(EstimatedParameter parameter) {
-    name     = parameter.name;
-    estimate = parameter.estimate;
-    bound    = parameter.bound;
-  }
-
-  /** Set a new estimated value for the parameter.
-   * @param estimate new estimate for the parameter
-   */
-  public void setEstimate(double estimate) {
-    this.estimate = estimate;
-  }
-
-  /** Get the current estimate of the parameter
-   * @return current estimate
-   */
-  public double getEstimate() {
-    return estimate;
-  }
-
-  /** get the name of the parameter
-   * @return parameter name
-   */
-  public String getName() {
-    return name;
-  }
-
-  /** Set the bound flag of the parameter
-   * @param bound this flag should be set to true if the parameter is
-   * bound (i.e. if it should not be adjusted by the solver).
-   */
-  public void setBound(boolean bound) {
-    this.bound = bound;
-  }
-
-  /** Check if the parameter is bound
-   * @return true if the parameter is bound */
-  public boolean isBound() {
-    return bound;
-  }
-
-  /** Name of the parameter */
-  private   String  name;
-
-  /** Current value of the parameter */
-  protected double  estimate;
-
-  /** Indicator for bound parameters
-   * (ie parameters that should not be estimated)
-   */
-  private   boolean bound;
+    /** Serializable version identifier */
+    private static final long serialVersionUID = -555440800213416949L;
 
-  /** Serializable version identifier */
-  private static final long serialVersionUID = -555440800213416949L;
+    /** Current value of the parameter */
+    protected double  estimate;
+
+    /** Name of the parameter */
+    private   String  name;
+
+    /** Indicator for bound parameters
+     * (ie parameters that should not be estimated)
+     */
+    private   boolean bound;
+
+    /** Simple constructor.
+     * Build an instance from a first estimate of the parameter,
+     * initially considered unbound.
+     * @param name name of the parameter
+     * @param firstEstimate first estimate of the parameter
+     */
+    public EstimatedParameter(String name, double firstEstimate) {
+        this.name = name;
+        estimate  = firstEstimate;
+        bound     = false;
+    }
+
+    /** Simple constructor.
+     * Build an instance from a first estimate of the parameter and a
+     * bound flag
+     * @param name name of the parameter
+     * @param firstEstimate first estimate of the parameter
+     * @param bound flag, should be true if the parameter is bound
+     */
+    public EstimatedParameter(String name,
+                              double firstEstimate,
+                              boolean bound) {
+        this.name  = name;
+        estimate   = firstEstimate;
+        this.bound = bound;
+    }
+
+    /** Copy constructor.
+     * Build a copy of a parameter
+     * @param parameter instance to copy
+     */
+    public EstimatedParameter(EstimatedParameter parameter) {
+        name     = parameter.name;
+        estimate = parameter.estimate;
+        bound    = parameter.bound;
+    }
+
+    /** Set a new estimated value for the parameter.
+     * @param estimate new estimate for the parameter
+     */
+    public void setEstimate(double estimate) {
+        this.estimate = estimate;
+    }
+
+    /** Get the current estimate of the parameter
+     * @return current estimate
+     */
+    public double getEstimate() {
+        return estimate;
+    }
+
+    /** get the name of the parameter
+     * @return parameter name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /** Set the bound flag of the parameter
+     * @param bound this flag should be set to true if the parameter is
+     * bound (i.e. if it should not be adjusted by the solver).
+     */
+    public void setBound(boolean bound) {
+        this.bound = bound;
+    }
+
+    /** Check if the parameter is bound
+     * @return true if the parameter is bound */
+    public boolean isBound() {
+        return bound;
+    }
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java Sun Sep  6 15:32:50 2009
@@ -103,6 +103,46 @@
 @Deprecated
 public class LevenbergMarquardtEstimator extends AbstractEstimator implements Serializable {
 
+    /** Serializable version identifier */
+    private static final long serialVersionUID = -5705952631533171019L;
+
+    /** Number of solved variables. */
+    private int solvedCols;
+
+    /** Diagonal elements of the R matrix in the Q.R. decomposition. */
+    private double[] diagR;
+
+    /** Norms of the columns of the jacobian matrix. */
+    private double[] jacNorm;
+
+    /** Coefficients of the Householder transforms vectors. */
+    private double[] beta;
+
+    /** Columns permutation array. */
+    private int[] permutation;
+
+    /** Rank of the jacobian matrix. */
+    private int rank;
+
+    /** Levenberg-Marquardt parameter. */
+    private double lmPar;
+
+    /** Parameters evolution direction associated with lmPar. */
+    private double[] lmDir;
+
+    /** Positive input variable used in determining the initial step bound. */
+    private double initialStepBoundFactor;
+
+    /** Desired relative error in the sum of squares. */
+    private double costRelativeTolerance;
+
+    /**  Desired relative error in the approximate solution parameters. */
+    private double parRelativeTolerance;
+
+    /** Desired max cosine on the orthogonality between the function vector
+     * and the columns of the jacobian. */
+    private double orthoTolerance;
+
   /**
    * Build an estimator for least squares problems.
    * <p>The default values for the algorithm settings are:
@@ -834,44 +874,4 @@
     }
   }
 
-  /** Number of solved variables. */
-  private int solvedCols;
-
-  /** Diagonal elements of the R matrix in the Q.R. decomposition. */
-  private double[] diagR;
-
-  /** Norms of the columns of the jacobian matrix. */
-  private double[] jacNorm;
-
-  /** Coefficients of the Householder transforms vectors. */
-  private double[] beta;
-
-  /** Columns permutation array. */
-  private int[] permutation;
-
-  /** Rank of the jacobian matrix. */
-  private int rank;
-
-  /** Levenberg-Marquardt parameter. */
-  private double lmPar;
-
-  /** Parameters evolution direction associated with lmPar. */
-  private double[] lmDir;
-
-  /** Positive input variable used in determining the initial step bound. */
-  private double initialStepBoundFactor;
-
-  /** Desired relative error in the sum of squares. */
-  private double costRelativeTolerance;
-
-  /**  Desired relative error in the approximate solution parameters. */
-  private double parRelativeTolerance;
-
-  /** Desired max cosine on the orthogonality between the function vector
-   * and the columns of the jacobian. */
-  private double orthoTolerance;
-
-  /** Serializable version identifier */
-  private static final long serialVersionUID = -5705952631533171019L;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java Sun Sep  6 15:32:50 2009
@@ -44,6 +44,12 @@
 @Deprecated
 public class SimpleEstimationProblem implements EstimationProblem {
 
+    /** Estimated parameters. */
+    private final List<EstimatedParameter> parameters;
+
+    /** Measurements. */
+    private final List<WeightedMeasurement> measurements;
+
     /**
      * Build an empty instance without parameters nor measurements.
      */
@@ -102,10 +108,4 @@
         measurements.add(m);
     }
 
-    /** Estimated parameters. */
-    private final List<EstimatedParameter> parameters;
-
-    /** Measurements. */
-    private final List<WeightedMeasurement> measurements;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java Sun Sep  6 15:32:50 2009
@@ -56,7 +56,16 @@
     /** Serializable version identifier. */
     private static final long serialVersionUID = 4360046376796901941L;
 
-    /**
+    /** Measurement weight. */
+    private final double  weight;
+
+    /** Value of the measurements. */
+    private final double  measuredValue;
+
+    /** Ignore measurement indicator. */
+    private boolean ignored;
+
+  /**
    * Simple constructor.
    * Build a measurement with the given parameters, and set its ignore
    * flag to false.
@@ -160,13 +169,4 @@
     return ignored;
   }
 
-  /** Measurement weight. */
-  private final double  weight;
-
-  /** Value of the measurements. */
-  private final double  measuredValue;
-
-  /** Ignore measurement indicator. */
-  private       boolean ignored;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java Sun Sep  6 15:32:50 2009
@@ -91,34 +91,6 @@
 
     /**
      * <p>
-     * Creates a <code>BigFraction</code> instance with the 2 parts of a fraction
-     * Y/Z.
-     * </p>
-     *
-     * <p>
-     * Any negative signs are resolved to be on the numerator.
-     * </p>
-     *
-     * @param numerator
-     *            the numerator, for example the three in 'three sevenths'.
-     * @param denominator
-     *            the denominator, for example the seven in 'three sevenths'.
-     * @return a new fraction instance, with the numerator and denominator
-     *         reduced.
-     * @throws ArithmeticException
-     *             if the denominator is <code>zero</code>.
-     */
-    public static BigFraction getReducedFraction(final int numerator,
-                                                 final int denominator) {
-        if (numerator == 0) {
-            return ZERO; // normalize zero.
-        }
-
-        return new BigFraction(numerator, denominator);
-    }
-
-    /**
-     * <p>
      * Create a {@link BigFraction} equivalent to the passed <tt>BigInteger</tt>, ie
      * "num / 1".
      * </p>
@@ -443,6 +415,34 @@
 
     /**
      * <p>
+     * Creates a <code>BigFraction</code> instance with the 2 parts of a fraction
+     * Y/Z.
+     * </p>
+     *
+     * <p>
+     * Any negative signs are resolved to be on the numerator.
+     * </p>
+     *
+     * @param numerator
+     *            the numerator, for example the three in 'three sevenths'.
+     * @param denominator
+     *            the denominator, for example the seven in 'three sevenths'.
+     * @return a new fraction instance, with the numerator and denominator
+     *         reduced.
+     * @throws ArithmeticException
+     *             if the denominator is <code>zero</code>.
+     */
+    public static BigFraction getReducedFraction(final int numerator,
+                                                 final int denominator) {
+        if (numerator == 0) {
+            return ZERO; // normalize zero.
+        }
+
+        return new BigFraction(numerator, denominator);
+    }
+
+    /**
+     * <p>
      * Returns the absolute value of this {@link BigFraction}.
      * </p>
      *

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java Sun Sep  6 15:32:50 2009
@@ -57,19 +57,15 @@
         return BigFraction.ZERO;
     }
 
+    // CHECKSTYLE: stop HideUtilityClassConstructor
     /** Holder for the instance.
      * <p>We use here the Initialization On Demand Holder Idiom.</p>
      */
     private static class LazyHolder {
-
-        /** Private constructor. */
-        private LazyHolder() {
-        }
-
         /** Cached field instance. */
         private static final BigFractionField INSTANCE = new BigFractionField();
-
     }
+    // CHECKSTYLE: resume HideUtilityClassConstructor
 
     /** Handle deserialization of the singleton.
      * @return the singleton instance

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/FractionField.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/FractionField.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/FractionField.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/FractionField.java Sun Sep  6 15:32:50 2009
@@ -57,19 +57,15 @@
         return Fraction.ZERO;
     }
 
+    // CHECKSTYLE: stop HideUtilityClassConstructor
     /** Holder for the instance.
      * <p>We use here the Initialization On Demand Holder Idiom.</p>
      */
     private static class LazyHolder {
-
-        /** Private constructor. */
-        private LazyHolder() {
-        }
-
         /** Cached field instance. */
         private static final FractionField INSTANCE = new FractionField();
-
     }
+    // CHECKSTYLE: resume HideUtilityClassConstructor
 
     /** Handle deserialization of the singleton.
      * @return the singleton instance

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=811827&r1=811826&r2=811827&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 15:32:50 2009
@@ -37,24 +37,6 @@
     //@GuardedBy("this")
     private static RandomGenerator randomGenerator = new JDKRandomGenerator();
 
-    /**
-     * Set the (static) random generator.
-     *
-     * @param random random generator
-     */
-    public static synchronized void setRandomGenerator(RandomGenerator random) {
-        randomGenerator = random;
-    }
-
-    /**
-     * Returns the (static) random generator.
-     *
-     * @return the static random generator shared by GA implementation classes
-     */
-    public static synchronized RandomGenerator getRandomGenerator() {
-        return randomGenerator;
-    }
-
     /** the crossover policy used by the algorithm. */
     private final CrossoverPolicy crossoverPolicy;
 
@@ -95,6 +77,24 @@
     }
 
     /**
+     * Set the (static) random generator.
+     *
+     * @param random random generator
+     */
+    public static synchronized void setRandomGenerator(RandomGenerator random) {
+        randomGenerator = random;
+    }
+
+    /**
+     * Returns the (static) random generator.
+     *
+     * @return the static random generator shared by GA implementation classes
+     */
+    public static synchronized RandomGenerator getRandomGenerator() {
+        return randomGenerator;
+    }
+
+    /**
      * Evolve the given population. Evolution stops when the stopping condition
      * is satisfied.
      *

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java Sun Sep  6 15:32:50 2009
@@ -28,17 +28,17 @@
 public class CardanEulerSingularityException
   extends MathException {
 
-  /**
-   * 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
-   */
-  public CardanEulerSingularityException(boolean isCardan) {
-    super(isCardan ? "Cardan angles singularity" : "Euler angles singularity");
-  }
+    /** Serializable version identifier */
+    private static final long serialVersionUID = -1360952845582206770L;
 
-  /** Serializable version identifier */
-  private static final long serialVersionUID = -1360952845582206770L;
+    /**
+     * 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
+     */
+    public CardanEulerSingularityException(boolean isCardan) {
+        super(isCardan ? "Cardan angles singularity" : "Euler angles singularity");
+    }
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/NotARotationMatrixException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/NotARotationMatrixException.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/NotARotationMatrixException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/NotARotationMatrixException.java Sun Sep  6 15:32:50 2009
@@ -30,17 +30,17 @@
 public class NotARotationMatrixException
   extends MathException {
 
-  /**
-   * 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)
-   */
-  public NotARotationMatrixException(String specifier, Object ... parts) {
-    super(specifier, parts);
-  }
+    /** Serializable version identifier */
+    private static final long serialVersionUID = 5647178478658937642L;
 
-  /** Serializable version identifier */
-  private static final long serialVersionUID = 5647178478658937642L;
+    /**
+     * 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)
+     */
+    public NotARotationMatrixException(String specifier, Object ... parts) {
+        super(specifier, parts);
+    }
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/RotationOrder.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/RotationOrder.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/RotationOrder.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/geometry/RotationOrder.java Sun Sep  6 15:32:50 2009
@@ -31,145 +31,145 @@
  */
 public final class RotationOrder {
 
-  /** Private constructor.
-   * This is a utility class that cannot be instantiated by the user,
-   * so its only constructor is private.
-   * @param name name of the rotation order
-   * @param a1 axis of the first rotation
-   * @param a2 axis of the second rotation
-   * @param a3 axis of the third rotation
-   */
-  private RotationOrder(String name,
-                        Vector3D a1, Vector3D a2, Vector3D a3) {
-    this.name = name;
-    this.a1   = a1;
-    this.a2   = a2;
-    this.a3   = a3;
-  }
-
-  /** Get a string representation of the instance.
-   * @return a string representation of the instance (in fact, its name)
-   */
-  @Override
-  public String toString() {
-    return name;
-  }
-
-  /** Get the axis of the first rotation.
-   * @return axis of the first rotation
-   */
-  public Vector3D getA1() {
-    return a1;
-  }
-
-  /** Get the axis of the second rotation.
-   * @return axis of the second rotation
-   */
-  public Vector3D getA2() {
-    return a2;
-  }
-
-  /** Get the axis of the second rotation.
-   * @return axis of the second rotation
-   */
-  public Vector3D getA3() {
-    return a3;
-  }
-
-  /** Set of Cardan angles.
-   * this ordered set of rotations is around X, then around Y, then
-   * around Z
-   */
-  public static final RotationOrder XYZ =
-    new RotationOrder("XYZ", Vector3D.PLUS_I, Vector3D.PLUS_J, Vector3D.PLUS_K);
-
-  /** Set of Cardan angles.
-   * this ordered set of rotations is around X, then around Z, then
-   * around Y
-   */
-  public static final RotationOrder XZY =
-    new RotationOrder("XZY", Vector3D.PLUS_I, Vector3D.PLUS_K, Vector3D.PLUS_J);
-
-  /** Set of Cardan angles.
-   * this ordered set of rotations is around Y, then around X, then
-   * around Z
-   */
-  public static final RotationOrder YXZ =
-    new RotationOrder("YXZ", Vector3D.PLUS_J, Vector3D.PLUS_I, Vector3D.PLUS_K);
-
-  /** Set of Cardan angles.
-   * this ordered set of rotations is around Y, then around Z, then
-   * around X
-   */
-  public static final RotationOrder YZX =
-    new RotationOrder("YZX", Vector3D.PLUS_J, Vector3D.PLUS_K, Vector3D.PLUS_I);
-
-  /** Set of Cardan angles.
-   * this ordered set of rotations is around Z, then around X, then
-   * around Y
-   */
-  public static final RotationOrder ZXY =
-    new RotationOrder("ZXY", Vector3D.PLUS_K, Vector3D.PLUS_I, Vector3D.PLUS_J);
-
-  /** Set of Cardan angles.
-   * this ordered set of rotations is around Z, then around Y, then
-   * around X
-   */
-  public static final RotationOrder ZYX =
-    new RotationOrder("ZYX", Vector3D.PLUS_K, Vector3D.PLUS_J, Vector3D.PLUS_I);
-
-  /** Set of Euler angles.
-   * this ordered set of rotations is around X, then around Y, then
-   * around X
-   */
-  public static final RotationOrder XYX =
-    new RotationOrder("XYX", Vector3D.PLUS_I, Vector3D.PLUS_J, Vector3D.PLUS_I);
-
-  /** Set of Euler angles.
-   * this ordered set of rotations is around X, then around Z, then
-   * around X
-   */
-  public static final RotationOrder XZX =
-    new RotationOrder("XZX", Vector3D.PLUS_I, Vector3D.PLUS_K, Vector3D.PLUS_I);
-
-  /** Set of Euler angles.
-   * this ordered set of rotations is around Y, then around X, then
-   * around Y
-   */
-  public static final RotationOrder YXY =
-    new RotationOrder("YXY", Vector3D.PLUS_J, Vector3D.PLUS_I, Vector3D.PLUS_J);
-
-  /** Set of Euler angles.
-   * this ordered set of rotations is around Y, then around Z, then
-   * around Y
-   */
-  public static final RotationOrder YZY =
-    new RotationOrder("YZY", Vector3D.PLUS_J, Vector3D.PLUS_K, Vector3D.PLUS_J);
-
-  /** Set of Euler angles.
-   * this ordered set of rotations is around Z, then around X, then
-   * around Z
-   */
-  public static final RotationOrder ZXZ =
-    new RotationOrder("ZXZ", Vector3D.PLUS_K, Vector3D.PLUS_I, Vector3D.PLUS_K);
-
-  /** Set of Euler angles.
-   * this ordered set of rotations is around Z, then around Y, then
-   * around Z
-   */
-  public static final RotationOrder ZYZ =
-    new RotationOrder("ZYZ", Vector3D.PLUS_K, Vector3D.PLUS_J, Vector3D.PLUS_K);
-
-  /** Name of the rotations order. */
-  private final String name;
-
-  /** Axis of the first rotation. */
-  private final Vector3D a1;
-
-  /** Axis of the second rotation. */
-  private final Vector3D a2;
-
-  /** Axis of the third rotation. */
-  private final Vector3D a3;
+    /** Set of Cardan angles.
+     * this ordered set of rotations is around X, then around Y, then
+     * around Z
+     */
+    public static final RotationOrder XYZ =
+      new RotationOrder("XYZ", Vector3D.PLUS_I, Vector3D.PLUS_J, Vector3D.PLUS_K);
+
+    /** Set of Cardan angles.
+     * this ordered set of rotations is around X, then around Z, then
+     * around Y
+     */
+    public static final RotationOrder XZY =
+      new RotationOrder("XZY", Vector3D.PLUS_I, Vector3D.PLUS_K, Vector3D.PLUS_J);
+
+    /** Set of Cardan angles.
+     * this ordered set of rotations is around Y, then around X, then
+     * around Z
+     */
+    public static final RotationOrder YXZ =
+      new RotationOrder("YXZ", Vector3D.PLUS_J, Vector3D.PLUS_I, Vector3D.PLUS_K);
+
+    /** Set of Cardan angles.
+     * this ordered set of rotations is around Y, then around Z, then
+     * around X
+     */
+    public static final RotationOrder YZX =
+      new RotationOrder("YZX", Vector3D.PLUS_J, Vector3D.PLUS_K, Vector3D.PLUS_I);
+
+    /** Set of Cardan angles.
+     * this ordered set of rotations is around Z, then around X, then
+     * around Y
+     */
+    public static final RotationOrder ZXY =
+      new RotationOrder("ZXY", Vector3D.PLUS_K, Vector3D.PLUS_I, Vector3D.PLUS_J);
+
+    /** Set of Cardan angles.
+     * this ordered set of rotations is around Z, then around Y, then
+     * around X
+     */
+    public static final RotationOrder ZYX =
+      new RotationOrder("ZYX", Vector3D.PLUS_K, Vector3D.PLUS_J, Vector3D.PLUS_I);
+
+    /** Set of Euler angles.
+     * this ordered set of rotations is around X, then around Y, then
+     * around X
+     */
+    public static final RotationOrder XYX =
+      new RotationOrder("XYX", Vector3D.PLUS_I, Vector3D.PLUS_J, Vector3D.PLUS_I);
+
+    /** Set of Euler angles.
+     * this ordered set of rotations is around X, then around Z, then
+     * around X
+     */
+    public static final RotationOrder XZX =
+      new RotationOrder("XZX", Vector3D.PLUS_I, Vector3D.PLUS_K, Vector3D.PLUS_I);
+
+    /** Set of Euler angles.
+     * this ordered set of rotations is around Y, then around X, then
+     * around Y
+     */
+    public static final RotationOrder YXY =
+      new RotationOrder("YXY", Vector3D.PLUS_J, Vector3D.PLUS_I, Vector3D.PLUS_J);
+
+    /** Set of Euler angles.
+     * this ordered set of rotations is around Y, then around Z, then
+     * around Y
+     */
+    public static final RotationOrder YZY =
+      new RotationOrder("YZY", Vector3D.PLUS_J, Vector3D.PLUS_K, Vector3D.PLUS_J);
+
+    /** Set of Euler angles.
+     * this ordered set of rotations is around Z, then around X, then
+     * around Z
+     */
+    public static final RotationOrder ZXZ =
+      new RotationOrder("ZXZ", Vector3D.PLUS_K, Vector3D.PLUS_I, Vector3D.PLUS_K);
+
+    /** Set of Euler angles.
+     * this ordered set of rotations is around Z, then around Y, then
+     * around Z
+     */
+    public static final RotationOrder ZYZ =
+      new RotationOrder("ZYZ", Vector3D.PLUS_K, Vector3D.PLUS_J, Vector3D.PLUS_K);
+
+    /** Name of the rotations order. */
+    private final String name;
+
+    /** Axis of the first rotation. */
+    private final Vector3D a1;
+
+    /** Axis of the second rotation. */
+    private final Vector3D a2;
+
+    /** Axis of the third rotation. */
+    private final Vector3D a3;
+
+    /** Private constructor.
+     * This is a utility class that cannot be instantiated by the user,
+     * so its only constructor is private.
+     * @param name name of the rotation order
+     * @param a1 axis of the first rotation
+     * @param a2 axis of the second rotation
+     * @param a3 axis of the third rotation
+     */
+    private RotationOrder(final String name,
+                          final Vector3D a1, final Vector3D a2, final Vector3D a3) {
+        this.name = name;
+        this.a1   = a1;
+        this.a2   = a2;
+        this.a3   = a3;
+    }
+
+    /** Get a string representation of the instance.
+     * @return a string representation of the instance (in fact, its name)
+     */
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    /** Get the axis of the first rotation.
+     * @return axis of the first rotation
+     */
+    public Vector3D getA1() {
+        return a1;
+    }
+
+    /** Get the axis of the second rotation.
+     * @return axis of the second rotation
+     */
+    public Vector3D getA2() {
+        return a2;
+    }
+
+    /** Get the axis of the second rotation.
+     * @return axis of the second rotation
+     */
+    public Vector3D getA3() {
+        return a3;
+    }
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java Sun Sep  6 15:32:50 2009
@@ -39,6 +39,45 @@
     private final Field<T> field;
 
     /**
+     * Constructor for use with Serializable
+     */
+    protected AbstractFieldMatrix() {
+        field = null;
+    }
+
+    /**
+     * Creates a matrix with no data
+     * @param field field to which the elements belong
+     */
+    protected AbstractFieldMatrix(final Field<T> field) {
+        this.field = field;
+    }
+
+    /**
+     * Create a new FieldMatrix<T> with the supplied row and column dimensions.
+     *
+     * @param field field to which the elements belong
+     * @param rowDimension  the number of rows in the new matrix
+     * @param columnDimension  the number of columns in the new matrix
+     * @throws IllegalArgumentException if row or column dimension is not positive
+     */
+    protected AbstractFieldMatrix(final Field<T> field,
+                                  final int rowDimension, final int columnDimension)
+        throws IllegalArgumentException {
+        if (rowDimension <= 0 ) {
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "invalid row dimension {0} (must be positive)",
+                    rowDimension);
+        }
+        if (columnDimension <= 0) {
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "invalid column dimension {0} (must be positive)",
+                    columnDimension);
+        }
+        this.field = field;
+    }
+
+    /**
      * Get the elements type from an array.
      * @param <T> the type of the field elements
      * @param d data array
@@ -115,45 +154,6 @@
         return array;
     }
 
-    /**
-     * Constructor for use with Serializable
-     */
-    protected AbstractFieldMatrix() {
-        field = null;
-    }
-
-    /**
-     * Creates a matrix with no data
-     * @param field field to which the elements belong
-     */
-    protected AbstractFieldMatrix(final Field<T> field) {
-        this.field = field;
-    }
-
-    /**
-     * Create a new FieldMatrix<T> with the supplied row and column dimensions.
-     *
-     * @param field field to which the elements belong
-     * @param rowDimension  the number of rows in the new matrix
-     * @param columnDimension  the number of columns in the new matrix
-     * @throws IllegalArgumentException if row or column dimension is not positive
-     */
-    protected AbstractFieldMatrix(final Field<T> field,
-                                  final int rowDimension, final int columnDimension)
-        throws IllegalArgumentException {
-        if (rowDimension <= 0 ) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                    "invalid row dimension {0} (must be positive)",
-                    rowDimension);
-        }
-        if (columnDimension <= 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                    "invalid column dimension {0} (must be positive)",
-                    columnDimension);
-        }
-        this.field = field;
-    }
-
     /** {@inheritDoc} */
     public Field<T> getField() {
         return field;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/ArrayFieldVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/ArrayFieldVector.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/ArrayFieldVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/ArrayFieldVector.java Sun Sep  6 15:32:50 2009
@@ -35,20 +35,11 @@
     /** Serializable version identifier. */
     private static final long serialVersionUID = 7648186910365927050L;
 
-    /** Field to which the elements belong. */
-    private final Field<T> field;
-
     /** Entries of the vector. */
     protected T[] data;
 
-    /** Build an array of elements.
-     * @param length size of the array to build
-     * @return a new array
-     */
-    @SuppressWarnings("unchecked")
-    private T[] buildArray(final int length) {
-        return (T[]) Array.newInstance(field.getZero().getClass(), length);
-    }
+    /** Field to which the elements belong. */
+    private final Field<T> field;
 
     /**
      * Build a 0-length vector.
@@ -228,6 +219,15 @@
         }
     }
 
+    /** Build an array of elements.
+     * @param length size of the array to build
+     * @return a new array
+     */
+    @SuppressWarnings("unchecked")
+    private T[] buildArray(final int length) {
+        return (T[]) Array.newInstance(field.getZero().getClass(), length);
+    }
+
     /** {@inheritDoc} */
     public Field<T> getField() {
         return field;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java Sun Sep  6 15:32:50 2009
@@ -54,6 +54,15 @@
 @Deprecated
 public class BigMatrixImpl implements BigMatrix, Serializable {
 
+    /** BigDecimal 0 */
+    static final BigDecimal ZERO = new BigDecimal(0);
+
+    /** BigDecimal 1 */
+    static final BigDecimal ONE = new BigDecimal(1);
+
+    /** Bound to determine effective singularity in LU decomposition */
+    private static final BigDecimal TOO_SMALL = new BigDecimal(10E-12);
+
     /** Serialization id */
     private static final long serialVersionUID = -1011428905656140431L;
 
@@ -77,14 +86,6 @@
     /*** BigDecimal scale ***/
     private int scale = 64;
 
-    /** Bound to determine effective singularity in LU decomposition */
-    private static final BigDecimal TOO_SMALL = new BigDecimal(10E-12);
-
-    /** BigDecimal 0 */
-    static final BigDecimal ZERO = new BigDecimal(0);
-    /** BigDecimal 1 */
-    static final BigDecimal ONE = new BigDecimal(1);
-
     /**
      * Creates a matrix with no data
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockFieldMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockFieldMatrix.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockFieldMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockFieldMatrix.java Sun Sep  6 15:32:50 2009
@@ -65,12 +65,12 @@
  */
 public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMatrix<T> implements Serializable {
 
-    /** Serializable version identifier */
-    private static final long serialVersionUID = -4602336630143123183L;
-
     /** Block size. */
     public static final int BLOCK_SIZE = 36;
 
+    /** Serializable version identifier */
+    private static final long serialVersionUID = -4602336630143123183L;
+
     /** Blocks of matrix entries. */
     private final T blocks[][];
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockRealMatrix.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockRealMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BlockRealMatrix.java Sun Sep  6 15:32:50 2009
@@ -63,12 +63,12 @@
  */
 public class BlockRealMatrix extends AbstractRealMatrix implements Serializable {
 
-    /** Serializable version identifier */
-    private static final long serialVersionUID = 4991895511313664478L;
-
     /** Block size. */
     public static final int BLOCK_SIZE = 52;
 
+    /** Serializable version identifier */
+    private static final long serialVersionUID = 4991895511313664478L;
+
     /** Blocks of matrix entries. */
     private final double blocks[][];
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java Sun Sep  6 15:32:50 2009
@@ -33,6 +33,9 @@
  */
 public class LUDecompositionImpl implements LUDecomposition {
 
+    /** Default bound to determine effective singularity in LU decomposition */
+    private static final double DEFAULT_TOO_SMALL = 10E-12;
+
     /** Entries of LU decomposition. */
     private double lu[][];
 
@@ -54,9 +57,6 @@
     /** Cached value of P. */
     private RealMatrix cachedP;
 
-    /** Default bound to determine effective singularity in LU decomposition */
-    private static final double DEFAULT_TOO_SMALL = 10E-12;
-
     /**
      * Calculates the LU-decomposition of the given matrix.
      * @param matrix The matrix to decompose.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java Sun Sep  6 15:32:50 2009
@@ -29,12 +29,12 @@
 */
 public class OpenMapRealVector implements SparseRealVector, Serializable {
 
-    /** Serializable version identifier. */
-    private static final long serialVersionUID = 8772222695580707260L;
-
     /** Default Tolerance for having a value considered zero. */
     public static final double DEFAULT_ZERO_TOLERANCE = 1.0e-12;
 
+    /** Serializable version identifier. */
+    private static final long serialVersionUID = 8772222695580707260L;
+
     /** Entries of the vector. */
     private final OpenIntToDoubleHashMap entries;
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java Sun Sep  6 15:32:50 2009
@@ -34,6 +34,17 @@
  */
 public abstract class AbstractIntegrator implements FirstOrderIntegrator {
 
+    /** Step handler. */
+    protected Collection<StepHandler> stepHandlers;
+
+    /** Current step start time. */
+    protected double stepStart;
+
+    /** Current stepsize. */
+    protected double stepSize;
+
+    /** Events handlers manager. */
+    protected CombinedEventsManager eventsHandlersManager;
 
     /** Name of the method. */
     private final String name;
@@ -47,18 +58,6 @@
     /** Differential equations to integrate. */
     private transient FirstOrderDifferentialEquations equations;
 
-    /** Step handler. */
-    protected Collection<StepHandler> stepHandlers;
-
-    /** Current step start time. */
-    protected double stepStart;
-
-    /** Current stepsize. */
-    protected double stepSize;
-
-    /** Events handlers manager. */
-    protected CombinedEventsManager eventsHandlersManager;
-
     /** Build an instance.
      * @param name name of the method
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java Sun Sep  6 15:32:50 2009
@@ -86,6 +86,24 @@
 public class ContinuousOutputModel
   implements StepHandler, Serializable {
 
+    /** Serializable version identifier */
+    private static final long serialVersionUID = -1417964919405031606L;
+
+    /** Initial integration time. */
+    private double initialTime;
+
+    /** Final integration time. */
+    private double finalTime;
+
+    /** Integration direction indicator. */
+    private boolean forward;
+
+    /** Current interpolator index. */
+    private int index;
+
+    /** Steps table. */
+    private List<StepInterpolator> steps;
+
   /** Simple constructor.
    * Build an empty continuous output model.
    */
@@ -355,22 +373,4 @@
     }
   }
 
-  /** Initial integration time. */
-  private double initialTime;
-
-  /** Final integration time. */
-  private double finalTime;
-
-  /** Integration direction indicator. */
-  private boolean forward;
-
-  /** Current interpolator index. */
-  private int index;
-
-  /** Steps table. */
-  private List<StepInterpolator> steps;
-
-  /** Serializable version identifier */
-  private static final long serialVersionUID = -1417964919405031606L;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java Sun Sep  6 15:32:50 2009
@@ -55,6 +55,21 @@
 
 public class FirstOrderConverter implements FirstOrderDifferentialEquations {
 
+    /** Underlying second order equations set. */
+    private final SecondOrderDifferentialEquations equations;
+
+    /** second order problem dimension. */
+    private final int dimension;
+
+    /** state vector. */
+    private final double[] z;
+
+    /** first time derivative of the state vector. */
+    private final double[] zDot;
+
+    /** second time derivative of the state vector. */
+    private final double[] zDDot;
+
   /** Simple constructor.
    * Build a converter around a second order equations set.
    * @param equations second order equations set to convert
@@ -99,19 +114,4 @@
 
   }
 
-  /** Underlying second order equations set. */
-  private SecondOrderDifferentialEquations equations;
-
-  /** second order problem dimension. */
-  private int dimension;
-
-  /** state vector. */
-  private double[] z;
-
-  /** first time derivative of the state vector. */
-  private double[] zDot;
-
-  /** second time derivative of the state vector. */
-  private double[] zDDot;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java Sun Sep  6 15:32:50 2009
@@ -58,12 +58,6 @@
  */
 public abstract class MultistepIntegrator extends AdaptiveStepsizeIntegrator {
 
-    /** Starter integrator. */
-    private FirstOrderIntegrator starter;
-
-    /** Number of steps of the multistep method (excluding the one being computed). */
-    private final int nSteps;
-
     /** First scaled derivative (h y'). */
     protected double[] scaled;
 
@@ -72,6 +66,12 @@
      */
     protected Array2DRowRealMatrix nordsieck;
 
+    /** Starter integrator. */
+    private FirstOrderIntegrator starter;
+
+    /** Number of steps of the multistep method (excluding the one being computed). */
+    private final int nSteps;
+
     /** Stepsize control exponent. */
     private double exp;
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java Sun Sep  6 15:32:50 2009
@@ -54,6 +54,26 @@
 public abstract class AdaptiveStepsizeIntegrator
   extends AbstractIntegrator {
 
+    /** Allowed absolute scalar error. */
+    protected final double scalAbsoluteTolerance;
+
+    /** Allowed relative scalar error. */
+    protected final double scalRelativeTolerance;
+
+    /** Allowed absolute vectorial error. */
+    protected final double[] vecAbsoluteTolerance;
+
+    /** Allowed relative vectorial error. */
+    protected final double[] vecRelativeTolerance;
+
+    /** User supplied initial step. */
+    private double initialStep;
+
+    /** Minimal step. */
+    private final double minStep;
+
+    /** Maximal step. */
+    private final double maxStep;
 
   /** Build an integrator with the given stepsize bounds.
    * The default step handler does nothing.
@@ -310,25 +330,4 @@
     return maxStep;
   }
 
-  /** Minimal step. */
-  private double minStep;
-
-  /** Maximal step. */
-  private double maxStep;
-
-  /** User supplied initial step. */
-  private double initialStep;
-
-  /** Allowed absolute scalar error. */
-  protected double scalAbsoluteTolerance;
-
-  /** Allowed relative scalar error. */
-  protected double scalRelativeTolerance;
-
-  /** Allowed absolute vectorial error. */
-  protected double[] vecAbsoluteTolerance;
-
-  /** Allowed relative vectorial error. */
-  protected double[] vecRelativeTolerance;
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java?rev=811827&r1=811826&r2=811827&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java Sun Sep  6 15:32:50 2009
@@ -34,6 +34,61 @@
 class DormandPrince54StepInterpolator
   extends RungeKuttaStepInterpolator {
 
+    /** Last row of the Butcher-array internal weights, element 0. */
+    private static final double A70 =    35.0 /  384.0;
+
+    // element 1 is zero, so it is neither stored nor used
+
+    /** Last row of the Butcher-array internal weights, element 2. */
+    private static final double A72 =   500.0 / 1113.0;
+
+    /** Last row of the Butcher-array internal weights, element 3. */
+    private static final double A73 =   125.0 /  192.0;
+
+    /** Last row of the Butcher-array internal weights, element 4. */
+    private static final double A74 = -2187.0 / 6784.0;
+
+    /** Last row of the Butcher-array internal weights, element 5. */
+    private static final double A75 =    11.0 /   84.0;
+
+    /** Shampine (1986) Dense output, element 0. */
+    private static final double D0 =  -12715105075.0 /  11282082432.0;
+
+    // element 1 is zero, so it is neither stored nor used
+
+    /** Shampine (1986) Dense output, element 2. */
+    private static final double D2 =   87487479700.0 /  32700410799.0;
+
+    /** Shampine (1986) Dense output, element 3. */
+    private static final double D3 =  -10690763975.0 /   1880347072.0;
+
+    /** Shampine (1986) Dense output, element 4. */
+    private static final double D4 =  701980252875.0 / 199316789632.0;
+
+    /** Shampine (1986) Dense output, element 5. */
+    private static final double D5 =   -1453857185.0 /    822651844.0;
+
+    /** Shampine (1986) Dense output, element 6. */
+    private static final double D6 =      69997945.0 /     29380423.0;
+
+    /** Serializable version identifier */
+    private static final long serialVersionUID = 4104157279605906956L;
+
+    /** First vector for interpolation. */
+    private double[] v1;
+
+    /** Second vector for interpolation. */
+    private double[] v2;
+
+    /** Third vector for interpolation. */
+    private double[] v3;
+
+    /** Fourth vector for interpolation. */
+    private double[] v4;
+
+    /** Initialization indicator for the interpolation vectors. */
+    private boolean vectorsInitialized;
+
   /** Simple constructor.
    * This constructor builds an instance that is not usable yet, the
    * {@link #reinitialize} method should be called before using the
@@ -156,59 +211,4 @@
 
   }
 
-  /** First vector for interpolation. */
-  private double[] v1;
-
-  /** Second vector for interpolation. */
-  private double[] v2;
-
-  /** Third vector for interpolation. */
-  private double[] v3;
-
-  /** Fourth vector for interpolation. */
-  private double[] v4;
-
-  /** Initialization indicator for the interpolation vectors. */
-  private boolean vectorsInitialized;
-
-  /** Last row of the Butcher-array internal weights, element 0. */
-  private static final double A70 =    35.0 /  384.0;
-
-  // element 1 is zero, so it is neither stored nor used
-
-  /** Last row of the Butcher-array internal weights, element 2. */
-  private static final double A72 =   500.0 / 1113.0;
-
-  /** Last row of the Butcher-array internal weights, element 3. */
-  private static final double A73 =   125.0 /  192.0;
-
-  /** Last row of the Butcher-array internal weights, element 4. */
-  private static final double A74 = -2187.0 / 6784.0;
-
-  /** Last row of the Butcher-array internal weights, element 5. */
-  private static final double A75 =    11.0 /   84.0;
-
-  /** Shampine (1986) Dense output, element 0. */
-  private static final double D0 =  -12715105075.0 /  11282082432.0;
-
-  // element 1 is zero, so it is neither stored nor used
-
-  /** Shampine (1986) Dense output, element 2. */
-  private static final double D2 =   87487479700.0 /  32700410799.0;
-
-  /** Shampine (1986) Dense output, element 3. */
-  private static final double D3 =  -10690763975.0 /   1880347072.0;
-
-  /** Shampine (1986) Dense output, element 4. */
-  private static final double D4 =  701980252875.0 / 199316789632.0;
-
-  /** Shampine (1986) Dense output, element 5. */
-  private static final double D5 =   -1453857185.0 /    822651844.0;
-
-  /** Shampine (1986) Dense output, element 6. */
-  private static final double D6 =      69997945.0 /     29380423.0;
-
-  /** Serializable version identifier */
-  private static final long serialVersionUID = 4104157279605906956L;
-
 }