public class CubicSpline
extends java.lang.Object
| Constructor and Description |
|---|
CubicSpline(CubicSpline sp)
constructor of a new spline from another one
|
CubicSpline(double[] xx,
double[] y)
constructor which takes only the data points
fp0 - the slope at the starting point assumed = 0.
|
CubicSpline(double[] xx,
double[] y,
double fp0,
double fpn)
constructor which also takes initial and final slope constraints
|
| Modifier and Type | Method and Description |
|---|---|
void |
differentiate()
Differentiates a spline in place.
|
double |
evaluateAt(double xx)
method to return an interpolated result at a given x value
|
void |
integrate()
Integrates a spline in place.
|
public CubicSpline(CubicSpline sp)
public CubicSpline(double[] xx,
double[] y,
double fp0,
double fpn)
xx - - the data X valuesy - - the data Y valuesfp0 - - the slope at the starting pointfpn - - the slope at the end pointpublic CubicSpline(double[] xx,
double[] y)
xx - - the data X valuesy - - the data Y valuespublic double evaluateAt(double xx)
xx - - the x value to evaluate the interpolation at
If x is outside the parameter rage - set return value = end pointpublic void differentiate()
public void integrate()