Adapt to API change in "Commons Numbers".

This commit is contained in:
Gilles Sadowski 2021-07-11 02:36:10 +02:00
parent 46a0c3ae41
commit 71bfa2daeb
4 changed files with 5 additions and 5 deletions

View File

@ -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() {

View File

@ -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);

View File

@ -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);
}

View File

@ -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;