diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java index 2237050ae..3af9b33fd 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java @@ -26,8 +26,8 @@ import org.apache.commons.math3.exception.DimensionMismatchException; * weights. * Subclasses must implement the {@link #computeRule(int) computeRule} method. * - * Type of the number used to represent the points and weights of the - * quadrature rules. + * @param 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 { } return rule; } - + /** * Stores a rule. * @@ -92,6 +92,8 @@ public abstract class BaseRuleFactory { /** * Converts the from the actual {@code Number} type to {@code double} * + * @param 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. */ diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java index f9d61396c..923e85eef 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java @@ -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. diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java index c4cbc69f6..fc6af6eef 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java @@ -32,6 +32,7 @@ import org.apache.commons.math3.util.Pair; * @since 3.1 */ public class LegendreHighPrecisionRuleFactory extends BaseRuleFactory { + /** Settings for enhanced precision computations. */ private final MathContext mContext; /** The number {@code 2}. */ private final BigDecimal two; diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java index 4c3524dc9..0cbfdcf06 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java @@ -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 BaseRuleFactory { points[iMax] = 0d; weights[iMax] = w; } - + return new Pair(points, weights); } } diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java new file mode 100644 index 000000000..066da3066 --- /dev/null +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/package-info.java @@ -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; diff --git a/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java b/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java index ef02a750f..2ff7910d4 100644 --- a/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java +++ b/src/main/java/org/apache/commons/math3/linear/ArrayRealVector.java @@ -25,7 +25,6 @@ import org.apache.commons.math3.exception.NotPositiveException; 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; diff --git a/src/main/java/org/apache/commons/math3/linear/RealVector.java b/src/main/java/org/apache/commons/math3/linear/RealVector.java index f05ea4d77..184b16259 100644 --- a/src/main/java/org/apache/commons/math3/linear/RealVector.java +++ b/src/main/java/org/apache/commons/math3/linear/RealVector.java @@ -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(); } diff --git a/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java b/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java index 101e4f478..a33d267a0 100644 --- a/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java +++ b/src/main/java/org/apache/commons/math3/optimization/PointValuePair.java @@ -93,19 +93,18 @@ public class PointValuePair extends Pair implements Serializab /** 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. diff --git a/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java b/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java index 3afecaacf..8b9970fbd 100644 --- a/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java +++ b/src/main/java/org/apache/commons/math3/optimization/PointVectorValuePair.java @@ -118,19 +118,18 @@ public class PointVectorValuePair extends Pair implements Se /** 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 extends Pair implements Se private Object readResolve() { return new PointVectorValuePair(point, value, false); } - } - }