Module ij
Package ij.measure

# Class SplineFitter

java.lang.Object
ij.measure.SplineFitter

public class SplineFitter extends Object
This class interpolates a set of points using natural cubic splines (assuming zero second derivatives at end points). Given a set of knots x (all different and arranged in increasing order) and function values y at these positions, the class build the spline that can be evaluated at any point xp within the range of x. It is based on the publication Haysn Hornbeck "Fast Cubic Spline Interpolation" https://arxiv.org/abs/2001.09253 Implemented by Eugene Katrukha (katpyxa@gmail.com) to fit the layout of SplineFitter class of ImageJ

## Constructor Summary

Constructors
Constructor
Description
`SplineFitter(float[] x, float[] y, int n)`
`SplineFitter(float[] x, float[] y, int n, boolean closed)`
For closed curves: the first and last y value should be identical; internally, a periodic continuation with a few will be used at both ends
`SplineFitter(int[] x, int[] y, int n)`

## Method Summary

Modifier and Type
Method
Description
`double`
`evalSpline(double xp)`
Evalutes spline function at given point
`double`
`evalSpline(float[] x, float[] y, int n, double xp)`
`double`
`evalSpline(int[] x, int[] y, int n, double xp)`
provides interpolated function value at position xp

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SplineFitter

public SplineFitter(int[] x, int[] y, int n)

### SplineFitter

public SplineFitter(float[] x, float[] y, int n, boolean closed)
For closed curves: the first and last y value should be identical; internally, a periodic continuation with a few will be used at both ends

### SplineFitter

public SplineFitter(float[] x, float[] y, int n)

## Method Details

### evalSpline

public double evalSpline(double xp)
Evalutes spline function at given point

### evalSpline

public double evalSpline(int[] x, int[] y, int n, double xp)
provides interpolated function value at position xp

### evalSpline

public double evalSpline(float[] x, float[] y, int n, double xp)