The interpolation polynomials match all sample points, including both values and provided derivatives. There is one polynomial for each component of the values vector. All polynomials have the same degree. The degree of the polynomials depends on the number of points and number of derivatives at each point. For example the interpolation polynomials for n sample points without any derivatives all have degree n-1. The interpolation polynomials for n sample points with the two extreme points having value and first derivative and the remaining points having value only all have degree n+1. The interpolation polynomial for n sample points with value, first and second derivative for all points all have degree 3n-1.
| Modifier and Type | Field and Description |
|---|---|
| private final List | abscissae
Sample abscissae. |
| private final List | bottomDiagonal
Bottom diagonal of the divided differences array. |
| private final List | topDiagonal
Top diagonal of the divided differences array. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addSamplePoint(final T
abscissa of the sample point x, final T[]... value and derivatives of the sample point
(if only one row is passed, it is the value, if two rows are
passed the first one is the value and the second the derivative
and so on) value)Add a sample point. |
| public T[][] | Returns: interpolated value and derivatives (value in row 0, 1st derivative in row 1, ... nth derivative in row n)interpolation abscissa x, int maximum derivation order order)Interpolate value and first derivatives at a specified abscissa. |
| public T[] | Returns: interpolated valueinterpolation abscissa x)Interpolate value at a specified abscissa. |
| abscissae | back to summary |
|---|---|
| private final List<T> abscissae Sample abscissae. | |
| bottomDiagonal | back to summary |
|---|---|
| private final List<T[]> bottomDiagonal Bottom diagonal of the divided differences array. | |
| topDiagonal | back to summary |
|---|---|
| private final List<T[]> topDiagonal Top diagonal of the divided differences array. | |
| FieldHermiteInterpolator | back to summary |
|---|---|
| public FieldHermiteInterpolator() Create an empty interpolator. | |
| addSamplePoint | back to summary |
|---|---|
| public void addSamplePoint(final T x, final T[]... value) throws ZeroException, MathArithmeticException, DimensionMismatchException, NullArgumentException Add a sample point. This method must be called once for each sample point. It is allowed to mix some calls with values only with calls with values and first derivatives. The point abscissae for all calls must be different.
| |
| derivatives | back to summary |
|---|---|
| public T[][] derivatives(T x, int order) throws NoDataException, NullArgumentException Interpolate value and first derivatives at a specified abscissa.
| |
| value | back to summary |
|---|---|
| public T[] value(T x) throws NoDataException, NullArgumentException Interpolate value at a specified abscissa.
| |