Deprecated
as a consequence of DifferentiableUnivariateFunction being deprecated. See corresponding docs for further information.
A polynomial spline function consists of a set of
interpolating polynomials and an ascending array of domain
knot points, determining the intervals over which the spline function
is defined by the constituent polynomials. The polynomials are assumed to
have been computed to match the values of another function at the knot
points. The value consistency constraints are not currently enforced by
PolynomialSplineFunction itself, but are assumed to hold among
the polynomials and knot points passed to the constructor.
Note
The polynomials in the polynomials property must be
centered on the knot points to compute the spline function values.
See below.
The domain of the polynomial spline function is
[smallest knot, largest knot]. Attempts to evaluate the
function at values outside of this range generate IllegalArgumentExceptions.
The value of the polynomial spline function for an argument x
is computed as follows:
x
belongs. If x is less than the smallest knot point or greater
than the largest one, an IllegalArgumentException
is thrown.j be the index of the largest knot point that is less
than or equal to x. The value returned is
polynomials[j](x - knot[j])| Modifier and Type | Field and Description |
|---|---|
| private final double[] | knots
Spline segment interval delimiters (knots). |
| private final int | n
Number of spline segments. |
| private final PolynomialFunction[] | polynomials
Deprecated
as a consequence of The polynomial functions that make up the spline.
PolynomialFunction being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public | PolynomialSplineFunction(double[]
Spline segment interval delimiters. knots, PolynomialFunction[] Polynomial functions that make up the spline. polynomials)
Deprecated
as a consequence of
PolynomialFunction being deprecated.
Construct a polynomial spline function with the given segment delimiters and interpolating polynomials. |
| Modifier and Type | Method and Description |
|---|---|
| public UnivariateFunction | Returns: the derivative function.Implements org. Get the derivative of the polynomial spline function. |
| public double[] | |
| public int | |
| public PolynomialFunction[] | Returns: the interpolating polynomials.
Deprecated
as a consequence of
PolynomialFunction being deprecated.
Get a copy of the interpolating polynomials array. |
| public boolean | Returns: true if x is a valid point.Point. x)Indicates whether a point is within the interpolation range. |
| public PolynomialSplineFunction | Returns: the derivative function.
Deprecated
as a consequence of
PolynomialSplineFunction being deprecated.
Get the derivative of the polynomial spline function. |
| public double | Returns: the value.Point for which the function value should be computed. v)Implements org. Compute the value for the function. |
| public DerivativeStructure | value(final DerivativeStructure
function input value t)Implements org. Simple mathematical function. |
| knots | back to summary |
|---|---|
| private final double[] knots Spline segment interval delimiters (knots). Size is n + 1 for n segments. | |
| n | back to summary |
|---|---|
| private final int n Number of spline segments. It is equal to the number of polynomials and to the number of partition points - 1. | |
| polynomials | back to summary |
|---|---|
| private final PolynomialFunction[] polynomials
Deprecated as a consequence of The polynomial functions that make up the spline. The first element
determines the value of the spline over the first subinterval, the
second over the second, etc. Spline function values are determined by
evaluating these functions at | |
| PolynomialSplineFunction | back to summary |
|---|---|
| public PolynomialSplineFunction(double[] knots, PolynomialFunction[] polynomials) throws NullArgumentException, NumberIsTooSmallException, DimensionMismatchException, NonMonotonicSequenceException
Deprecated as a consequence of Construct a polynomial spline function with the given segment delimiters and interpolating polynomials. The constructor copies both arrays and assigns the copies to the knots and polynomials properties, respectively.
| |
| derivative | back to summary |
|---|---|
| public UnivariateFunction derivative() Implements org. Get the derivative of the polynomial spline function.
| |
| getKnots | back to summary |
|---|---|
| public double[] getKnots() Get an array copy of the knot points. It returns a fresh copy of the array. Changes made to the copy will not affect the knots property.
| |
| getN | back to summary |
|---|---|
| public int getN() Get the number of spline segments. It is also the number of polynomials and the number of knot points - 1.
| |
| getPolynomials | back to summary |
|---|---|
| public PolynomialFunction[] getPolynomials()
Deprecated as a consequence of Get a copy of the interpolating polynomials array. It returns a fresh copy of the array. Changes made to the copy will not affect the polynomials property.
| |
| isValidPoint | back to summary |
|---|---|
| public boolean isValidPoint(double x) Indicates whether a point is within the interpolation range.
| |
| polynomialSplineDerivative | back to summary |
|---|---|
| public PolynomialSplineFunction polynomialSplineDerivative()
Deprecated as a consequence of Get the derivative of the polynomial spline function.
| |
| value | back to summary |
|---|---|
| public double value(double v) Implements org. Compute the value for the function.
See
| |
| value | back to summary |
|---|---|
| public DerivativeStructure value(final DerivativeStructure t) Implements org. Doc from org. Simple mathematical function.
| |