This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c1c92d3e MATH-1589: Remove spurious "throws" clause.
3c1c92d3e is described below

commit 3c1c92d3eb6c13db92ea6123f8ad0d2383117f66
Author: Gilles Sadowski <gillese...@gmail.com>
AuthorDate: Fri Aug 12 16:52:30 2022 +0200

    MATH-1589: Remove spurious "throws" clause.
---
 .../legacy/analysis/interpolation/SplineInterpolator.java  | 13 ++++---------
 .../analysis/interpolation/UnivariateInterpolator.java     | 14 ++++----------
 2 files changed, 8 insertions(+), 19 deletions(-)

diff --git 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/SplineInterpolator.java
 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/SplineInterpolator.java
index e85ae1004..d6d262a6a 100644
--- 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/SplineInterpolator.java
+++ 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/SplineInterpolator.java
@@ -19,7 +19,6 @@ package 
org.apache.commons.math4.legacy.analysis.interpolation;
 import org.apache.commons.math4.legacy.analysis.polynomials.PolynomialFunction;
 import 
org.apache.commons.math4.legacy.analysis.polynomials.PolynomialSplineFunction;
 import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
-import org.apache.commons.math4.legacy.exception.NonMonotonicSequenceException;
 import org.apache.commons.math4.legacy.exception.NumberIsTooSmallException;
 import org.apache.commons.math4.legacy.exception.util.LocalizedFormats;
 import org.apache.commons.math4.legacy.core.MathArrays;
@@ -57,16 +56,12 @@ public class SplineInterpolator implements 
UnivariateInterpolator {
      * @return a function which interpolates the data set
      * @throws DimensionMismatchException if {@code x} and {@code y}
      * have different sizes.
-     * @throws NonMonotonicSequenceException if {@code x} is not sorted in
-     * strict increasing order.
-     * @throws NumberIsTooSmallException if the size of {@code x} is smaller
-     * than 3.
+     * @throws NumberIsTooSmallException if the size of {@code x < 3}.
+     * @throws 
org.apache.commons.math4.legacy.exception.NonMonotonicSequenceException
+     * if {@code x} is not sorted in strict increasing order.
      */
     @Override
-    public PolynomialSplineFunction interpolate(double[] x, double[] y)
-        throws DimensionMismatchException,
-               NumberIsTooSmallException,
-               NonMonotonicSequenceException {
+    public PolynomialSplineFunction interpolate(double[] x, double[] y) {
         if (x.length != y.length) {
             throw new DimensionMismatchException(x.length, y.length);
         }
diff --git 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariateInterpolator.java
 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariateInterpolator.java
index ef2a5fcae..ebf576d41 100644
--- 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariateInterpolator.java
+++ 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariateInterpolator.java
@@ -17,25 +17,19 @@
 package org.apache.commons.math4.legacy.analysis.interpolation;
 
 import org.apache.commons.math4.legacy.analysis.UnivariateFunction;
-import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
-import org.apache.commons.math4.legacy.exception.MathIllegalArgumentException;
 
 /**
  * Interface representing a univariate real interpolating function.
- *
  */
 public interface UnivariateInterpolator {
     /**
-     * Compute an interpolating function for the dataset.
+     * Computes an interpolating function for the dataset.
      *
      * @param xval Arguments for the interpolation points.
      * @param yval Values for the interpolation points.
      * @return a function which interpolates the dataset.
-     * @throws MathIllegalArgumentException
-     * if the arguments violate assumptions made by the interpolation
-     * algorithm.
-     * @throws DimensionMismatchException if arrays lengths do not match
+     * @throws 
org.apache.commons.math4.legacy.exception.MathIllegalArgumentException
+     * if the arguments violate assumptions made by the interpolation 
algorithm.
      */
-    UnivariateFunction interpolate(double[] xval, double[] yval)
-        throws MathIllegalArgumentException, DimensionMismatchException;
+    UnivariateFunction interpolate(double[] xval, double[] yval);
 }

Reply via email to