bundles / scipy 1.17.1 / scipy / interpolate / _interpolate / BPoly / _construct_from_derivatives
staticmethod
scipy.interpolate._interpolate:BPoly._construct_from_derivatives
Signature
def _construct_from_derivatives ( xa , xb , ya , yb ) Summary
Compute the coefficients of a polynomial in the Bernstein basis given the values and derivatives at the edges.
Extended Summary
Return the coefficients of a polynomial in the Bernstein basis defined on [xa, xb] and having the values and derivatives at the endpoints xa and xb as specified by ya and yb. The polynomial constructed is of the minimal possible degree, i.e., if the lengths of ya and yb are na and nb, the degree of the polynomial is na + nb - 1.
Parameters
xa: floatLeft-hand end point of the interval
xb: floatRight-hand end point of the interval
ya: array_likeDerivatives at
xa.ya[0]is the value of the function, andya[i]fori > 0is the value of theith derivative.yb: array_likeDerivatives at
xb.
Returns
: arraycoefficient array of a polynomial having specified derivatives
Notes
This uses several facts from life of Bernstein basis functions. First of all,
If B(x) is a linear combination of the form
then :math: B'(x) = n sum_{a=0}^{n-1} (c_{a+1} - c_{a}) b_{a, n-1}. Iterating the latter one, one finds for the q-th derivative
with
This way, only a=0 contributes to :math: B^{q}(x = xa), and c_q are found one by one by iterating q = 0, ..., na.
At x = xb it's the same with a = n - q.
Aliases
-
scipy.interpolate.BPoly._construct_from_derivatives