You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2012/07/16 01:42:39 UTC

svn commit: r1361839 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3: analysis/integration/gauss/ linear/ optimization/

Author: erans
Date: Sun Jul 15 23:42:38 2012
New Revision: 1361839

URL: http://svn.apache.org/viewvc?rev=1361839&view=rev
Log:
Fixed CheckStyle warnings.

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java   (with props)
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealVector.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java Sun Jul 15 23:42:38 2012
@@ -26,8 +26,8 @@ import org.apache.commons.math3.exceptio
  * weights.
  * Subclasses must implement the {@link #computeRule(int) computeRule} method.
  *
- * <T> Type of the number used to represent the points and weights of the
- * quadrature rules.
+ * @param <T> Type of the number used to represent the points and weights of
+ * the quadrature rules.
  *
  * @version $Id$
  * @since 3.1
@@ -64,7 +64,7 @@ public abstract class BaseRuleFactory<T 
         }
         return rule;
     }
-    
+
     /**
      * Stores a rule.
      *
@@ -92,6 +92,8 @@ public abstract class BaseRuleFactory<T 
     /**
      * Converts the from the actual {@code Number} type to {@code double}
      *
+     * @param <T> Type of the number used to represent the points and
+     * weights of the quadrature rules.
      * @param rule Points and weights.
      * @return points and weights as {@code double}s.
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java Sun Jul 15 23:42:38 2012
@@ -16,10 +16,7 @@
  */
 package org.apache.commons.math3.analysis.integration.gauss;
 
-import java.util.Map;
-import java.util.TreeMap;
 import org.apache.commons.math3.util.Pair;
-import org.apache.commons.math3.exception.DimensionMismatchException;
 
 /**
  * Class that provides different ways to compute the nodes and weights to be
@@ -108,7 +105,7 @@ public class GaussIntegratorFactory {
      * Performs a change of variable so that the integration can be performed
      * on an arbitrary interval {@code [a, b]}.
      * It is assumed that the natural interval is {@code [-1, 1]}.
-     * 
+     *
      * @param rule Original points and weights.
      * @param a Lower bound of the integration interval.
      * @param b Lower bound of the integration interval.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java Sun Jul 15 23:42:38 2012
@@ -32,6 +32,7 @@ import org.apache.commons.math3.util.Pai
  * @since 3.1
  */
 public class LegendreHighPrecisionRuleFactory extends BaseRuleFactory<BigDecimal> {
+    /** Settings for enhanced precision computations. */
     private final MathContext mContext;
     /** The number {@code 2}. */
     private final BigDecimal two;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java Sun Jul 15 23:42:38 2012
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math3.analysis.integration.gauss;
 
-import java.math.MathContext;
-import java.math.BigDecimal;
 import org.apache.commons.math3.util.Pair;
 
 /**
@@ -133,7 +131,7 @@ public class LegendreRuleFactory extends
             points[iMax] = 0d;
             weights[iMax] = w;
         }
- 
+
         return new Pair<Double[], Double[]>(points, weights);
     }
 }

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java?rev=1361839&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java Sun Jul 15 23:42:38 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ *
+ * Gauss family of quadrature schemes.
+ *
+ */
+package org.apache.commons.math3.analysis.integration.gauss;

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java Sun Jul 15 23:42:38 2012
@@ -25,7 +25,6 @@ import org.apache.commons.math3.exceptio
 import org.apache.commons.math3.exception.NullArgumentException;
 import org.apache.commons.math3.exception.DimensionMismatchException;
 import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.MathArithmeticException;
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
 import org.apache.commons.math3.util.MathUtils;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealVector.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealVector.java Sun Jul 15 23:42:38 2012
@@ -1088,7 +1088,7 @@ public abstract class RealVector {
      * not equal to this {@code RealVector} instance.
      */
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(Object other) {
         throw new UnsupportedOperationException();
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java Sun Jul 15 23:42:38 2012
@@ -93,19 +93,18 @@ public class PointValuePair extends Pair
 
     /** Internal class used only for serialization. */
     private static class DataTransferObject implements Serializable {
-
         /** Serializable UID. */
         private static final long serialVersionUID = 20120513L;
-
-        /** Point coordinates.
+        /**
+         * Point coordinates.
          * @Serial
          */
-        final double[] point;
-
-        /** Value of the objective function at the point.
+        private final double[] point;
+        /**
+         * Value of the objective function at the point.
          * @Serial
          */
-        final double value;
+        private final double value;
 
         /** Simple constructor.
          * @param point Point coordinates.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java?rev=1361839&r1=1361838&r2=1361839&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java Sun Jul 15 23:42:38 2012
@@ -118,19 +118,18 @@ public class PointVectorValuePair extend
 
     /** Internal class used only for serialization. */
     private static class DataTransferObject implements Serializable {
-
         /** Serializable UID. */
         private static final long serialVersionUID = 20120513L;
-
-        /** Point coordinates.
+        /**
+         * Point coordinates.
          * @Serial
          */
-        final double[] point;
-
-        /** Value of the objective function at the point.
+        private final double[] point;
+        /**
+         * Value of the objective function at the point.
          * @Serial
          */
-        final double[] value;
+        private final double[] value;
 
         /** Simple constructor.
          * @param point Point coordinates.
@@ -147,7 +146,5 @@ public class PointVectorValuePair extend
         private Object readResolve() {
             return new PointVectorValuePair(point, value, false);
         }
-
     }
-
 }