org.gvsig.vectorediting.lib.prov.editvertex.operation

## Class SplineCalculator

• java.lang.Object
• org.gvsig.vectorediting.lib.prov.editvertex.operation.SplineCalculator

• ```public class SplineCalculator
extends Object```
• ### Constructor Summary

Constructors
Constructor and Description
`SplineCalculator(double[] y)`
The constructor calculates the second derivatives of the interpolating function at the tabulated points xi, with xi = (i, y[i]).
• ### Method Summary

Methods
Modifier and Type Method and Description
`double` ```fn(int n, double t)```
Returns a cubic-spline interpolated value y for the point between point (n, y[n]) and (n+1, y[n+1), with t ranging from 0 for (n, y[n]) to 1 for (n+1, y[n+1]).
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### SplineCalculator

`public SplineCalculator(double[] y)`
The constructor calculates the second derivatives of the interpolating function at the tabulated points xi, with xi = (i, y[i]). Based on numerical recipes in C, http://www.library.cornell.edu/nr/bookcpdf/c3-3.pdf .
Parameters:
`y` - Array of y coordinates for cubic-spline interpolation.
• ### Method Detail

• #### fn

```public double fn(int n,
double t)```
Returns a cubic-spline interpolated value y for the point between point (n, y[n]) and (n+1, y[n+1), with t ranging from 0 for (n, y[n]) to 1 for (n+1, y[n+1]).
Parameters:
`n` - The start point.
`t` - The distance to the next point (0..1).
Returns:
A cubic-spline interpolated value.