f = new CubicInterpolation(
x, y,
CubicInterpolation.DerivativeApprox.Spline, true,
CubicInterpolation.BoundaryCondition.SecondDerivative, -2.0,
CubicInterpolation.BoundaryCondition.SecondDerivative, -2.0);
f.update();
checkValues("MC SecondDerivative spline", f, x, y);
check1stDerivativeValue("MC SecondDerivative spline", f, x.get(0), 4.0);
check1stDerivativeValue("MC SecondDerivative spline", f, x.get(n-1), -4.0);
check2ndDerivativeValue("SecondDerivative spline", f, x.get(0), -2.0);
check2ndDerivativeValue("MC SecondDerivative spline", f, x.get(n-1), -2.0);