|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.orekit.utils.HermiteInterpolator
public class HermiteInterpolator
Polynomial interpolator using both sample values and sample derivatives.
WARNING: this class is not expected to remain in Orekit. It is provided by version 3.1 of Apache Commons Math. However, since as of writing (June 2012) this version is not released yet, Orekit depends on the latest official version 3.0 which does not provides this class. So despite it is implemented as a public class in Orekit so it can be used in from any package, it does not belong to Orekit public API and should not be used at application level. Once version 3.1 of Apache Commons Math is released, this class will be removed from Orekit.
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 polynomial 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.
Users should better use this class than its Commons Math counterpart
HermiteInterpolator
to perform Hermit interpolation. Indeed, the Orekit's HermiteInterpolator
class offers higher performances.
| Constructor Summary | |
|---|---|
HermiteInterpolator()
Create an empty interpolator. |
|
| Method Summary | |
|---|---|
void |
addSamplePoint(double x,
double[]... value)
Add a sample point. |
UnivariateVectorFunction |
derivative()
Returns the derivative of the function |
double[] |
derivative(double x)
Interpolate first derivative at a specified abscissa. |
PolynomialFunction[] |
getPolynomials()
Compute the interpolation polynomials. |
double[] |
value(double 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 |
| Constructor Detail |
|---|
public HermiteInterpolator()
| Method Detail |
|---|
public void addSamplePoint(double x,
double[]... value)
throws IllegalArgumentException
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)
IllegalArgumentException - if the abscissa is equals to a previously
added sample point
public PolynomialFunction[] getPolynomials()
throws IllegalStateException
IllegalStateException - if sample is empty
public double[] value(double x)
throws IllegalStateException
Calling this method is equivalent to call the value methods of all polynomials returned by getPolynomials,
except it does not build the intermediate polynomials, so this method is faster and
numerically more stable.
value in interface UnivariateVectorFunctionx - interpolation abscissa
IllegalStateException - if sample is empty
public double[] derivative(double x)
throws IllegalStateException
Calling this method is equivalent to call the value methods of the derivatives of all polynomials returned by getPolynomials, except it builds neither the intermediate
polynomials nor their derivatives, so this method is faster and numerically more stable.
x - interpolation abscissa
IllegalStateException - if sample is emptypublic UnivariateVectorFunction derivative()
derivative in interface DifferentiableUnivariateVectorFunction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||