|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.analysis.interpolation.FieldHermiteInterpolator<T>
T
- Type of the field elements.public class FieldHermiteInterpolator<T extends FieldElement<T>>
Polynomial interpolator using both sample values and sample derivatives.
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.
Field Summary | |
---|---|
private List<T> |
abscissae
Sample abscissae. |
private List<T[]> |
bottomDiagonal
Bottom diagonal of the divided differences array. |
private List<T[]> |
topDiagonal
Top diagonal of the divided differences array. |
Constructor Summary | |
---|---|
FieldHermiteInterpolator()
Create an empty interpolator. |
Method Summary | |
---|---|
void |
addSamplePoint(T x,
T[]... value)
Add a sample point. |
T[][] |
derivatives(T x,
int order)
Interpolate value and first derivatives at a specified abscissa. |
T[] |
value(T x)
Interpolate value at a specified abscissa. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final List<T extends FieldElement<T>> abscissae
private final List<T extends FieldElement<T>[]> topDiagonal
private final List<T extends FieldElement<T>[]> bottomDiagonal
Constructor Detail |
---|
public FieldHermiteInterpolator()
Method Detail |
---|
public void addSamplePoint(T x, T[]... value) throws ZeroException, MathArithmeticException, DimensionMismatchException, NullArgumentException
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.
x
- abscissa of the sample pointvalue
- 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)
ZeroException
- if the abscissa difference between added point
and a previous point is zero (i.e. the two points are at same abscissa)
MathArithmeticException
- if the number of derivatives is larger
than 20, which prevents computation of a factorial
DimensionMismatchException
- if derivative structures are inconsistent
NullArgumentException
- if x is nullpublic T[] value(T x) throws NoDataException, NullArgumentException
x
- interpolation abscissa
NoDataException
- if sample is empty
NullArgumentException
- if x is nullpublic T[][] derivatives(T x, int order) throws NoDataException, NullArgumentException
x
- interpolation abscissaorder
- maximum derivation order
NoDataException
- if sample is empty
NullArgumentException
- if x is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |