Array declaration.
This commit is contained in:
parent
00f4de04fb
commit
8d36e18b21
|
@ -82,13 +82,13 @@ public class SplineInterpolator implements UnivariateInterpolator {
|
|||
MathArrays.checkOrder(x);
|
||||
|
||||
// Differences between knot points
|
||||
final double h[] = new double[n];
|
||||
final double[] h = new double[n];
|
||||
for (int i = 0; i < n; i++) {
|
||||
h[i] = x[i + 1] - x[i];
|
||||
}
|
||||
|
||||
final double mu[] = new double[n];
|
||||
final double z[] = new double[n + 1];
|
||||
final double[] mu = new double[n];
|
||||
final double[] z = new double[n + 1];
|
||||
mu[0] = 0d;
|
||||
z[0] = 0d;
|
||||
double g = 0;
|
||||
|
@ -100,9 +100,9 @@ public class SplineInterpolator implements UnivariateInterpolator {
|
|||
}
|
||||
|
||||
// cubic spline coefficients -- b is linear, c quadratic, d is cubic (original y's are constants)
|
||||
final double b[] = new double[n];
|
||||
final double c[] = new double[n + 1];
|
||||
final double d[] = new double[n];
|
||||
final double[] b = new double[n];
|
||||
final double[] c = new double[n + 1];
|
||||
final double[] d = new double[n];
|
||||
|
||||
z[n] = 0d;
|
||||
c[n] = 0d;
|
||||
|
@ -113,8 +113,8 @@ public class SplineInterpolator implements UnivariateInterpolator {
|
|||
d[j] = (c[j + 1] - c[j]) / (3d * h[j]);
|
||||
}
|
||||
|
||||
final PolynomialFunction polynomials[] = new PolynomialFunction[n];
|
||||
final double coefficients[] = new double[4];
|
||||
final PolynomialFunction[] polynomials = new PolynomialFunction[n];
|
||||
final double[] coefficients = new double[4];
|
||||
for (int i = 0; i < n; i++) {
|
||||
coefficients[0] = y[i];
|
||||
coefficients[1] = b[i];
|
||||
|
|
Loading…
Reference in New Issue