Class CubicSplineInterpolator

java.lang.Object
org.episteme.core.mathematics.analysis.interpolation.CubicSplineInterpolator

public class CubicSplineInterpolator extends Object
Cubic spline interpolation for smooth curve fitting.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • 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.