Class CubicSplineInterpolator
java.lang.Object
org.episteme.core.mathematics.analysis.interpolation.CubicSplineInterpolator
Cubic spline interpolation for smooth curve fitting.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
ConstructorsConstructorDescriptionCubicSplineInterpolator(double[] x, double[] y) Constructs a natural cubic spline through the given points. -
Method Summary
Modifier and TypeMethodDescriptiondoublederivative(double xval) Returns the derivative at the given point.doubleinterpolate(double xval) Interpolates the value at the given point.doublesecondDerivative(double xval) Returns the second derivative at the given point.
-
Constructor Details
-
CubicSplineInterpolator
public CubicSplineInterpolator(double[] x, double[] y) Constructs a natural cubic spline through the given points.- Parameters:
x- x-coordinates (must be strictly increasing)y- y-coordinates
-
-
Method Details
-
interpolate
public double interpolate(double xval) Interpolates the value at the given point.- Parameters:
xval- the x-coordinate- Returns:
- interpolated y-value
-
derivative
public double derivative(double xval) Returns the derivative at the given point. -
secondDerivative
public double secondDerivative(double xval) Returns the second derivative at the given point.
-