diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolator.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolator.java index ef3122a13..942d05556 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolator.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolator.java @@ -114,7 +114,7 @@ public class UnivariatePeriodicInterpolator y[index] = yval[i]; } - SortInPlace.ASCENDING.accept(x, y); + SortInPlace.ASCENDING.apply(x, y); final UnivariateFunction f = interpolator.interpolate(x, y); return new UnivariateFunction() { diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/polynomials/PolynomialFunctionLagrangeForm.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/polynomials/PolynomialFunctionLagrangeForm.java index c0fe244b8..14f94b7c6 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/polynomials/PolynomialFunctionLagrangeForm.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/polynomials/PolynomialFunctionLagrangeForm.java @@ -78,7 +78,7 @@ public class PolynomialFunctionLagrangeForm implements UnivariateFunction { coefficientsComputed = false; if (!verifyInterpolationArray(x, y, false)) { - SortInPlace.ASCENDING.accept(this.x, this.y); + SortInPlace.ASCENDING.apply(this.x, this.y); // Second check in case some abscissa is duplicated. verifyInterpolationArray(this.x, this.y, true); } @@ -183,7 +183,7 @@ public class PolynomialFunctionLagrangeForm implements UnivariateFunction { System.arraycopy(x, 0, xNew, 0, x.length); System.arraycopy(y, 0, yNew, 0, y.length); - SortInPlace.ASCENDING.accept(xNew, yNew); + SortInPlace.ASCENDING.apply(xNew, yNew); // Second check in case some abscissa is duplicated. verifyInterpolationArray(xNew, yNew, true); return evaluateInternal(xNew, yNew, z); diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentile.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentile.java index 01664fab2..5ffc871a2 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentile.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentile.java @@ -767,7 +767,7 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic new double[] { xval[1], xval[1 + delta] }; final double[] yBad = new double[] { yval[1], yval[1 + delta] }; - SortInPlace.ASCENDING.accept(xBad, yBad);// since d can be +/- 1 + SortInPlace.ASCENDING.apply(xBad, yBad);// since d can be +/- 1 univariateFunction = linear.interpolate(xBad, yBad); markerHeight = univariateFunction.value(xD); } diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java index 61c5dc516..8d2ac8883 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/rank/Percentile.java @@ -1150,7 +1150,7 @@ public class Percentile extends AbstractUnivariateStatistic implements Serializa @Override public double evaluate(final double[] work, final double[] sampleWeights, final double p) { - SortInPlace.ASCENDING.accept(work, sampleWeights); + SortInPlace.ASCENDING.apply(work, sampleWeights); double[] sk = new double[work.length]; for(int k = 0; k < work.length; k++) { sk[k] = 0;