public class CubicSplineFunction extends PiecewiseFunction
xa, ya| Constructor and Description |
|---|
CubicSplineFunction(double[] x,
double[] y) |
CubicSplineFunction(double[] x,
double[] y,
double derivativeAtFirst,
double derivativeAtLast) |
CubicSplineFunction(java.awt.geom.Point2D[] controlPoints)
Creates neutral spline, assuming that derivatives at first and last control points are 0.
|
CubicSplineFunction(java.awt.geom.Point2D[] controlPoints,
double derivativeAtFirst,
double derivativeAtLast)
Creates a spline with given values of derivatives at first and the last point.
|
| Modifier and Type | Method and Description |
|---|---|
CubicSplineFunction |
clone() |
double |
evaluate(double x)
Return cubic-spline interpolated value of
y. |
double |
getDerivativeAtFirst()
Required derivative at the first control point.
|
double |
getDerivativeAtLast()
Required derivative at the last control point.
|
evaluate, getControlPoints, sortpublic CubicSplineFunction(double[] x,
double[] y)
public CubicSplineFunction(double[] x,
double[] y,
double derivativeAtFirst,
double derivativeAtLast)
public CubicSplineFunction(java.awt.geom.Point2D[] controlPoints)
controlPoints - spline control points.public CubicSplineFunction(java.awt.geom.Point2D[] controlPoints,
double derivativeAtFirst,
double derivativeAtLast)
controlPoints - spline control points.derivativeAtFirst - derivative at first control point.derivativeAtLast - derivative at last control point.public double getDerivativeAtFirst()
public double getDerivativeAtLast()
public double evaluate(double x)
y.evaluate in interface IFunctionevaluate in class PiecewiseFunctionx - x-coordinate at which to evaluate the interpolation function.y.public CubicSplineFunction clone() throws java.lang.CloneNotSupportedException
clone in class PiecewiseFunctionjava.lang.CloneNotSupportedException