PiecewisePolynomial.__init__(xi, yi, orders=None, direction=None)

Construct a piecewise polynomial

Parameters :

xi : array-like of length N

a sorted list of x-coordinates

yi : list of lists of length N

yi[i] is the list of derivatives known at xi[i]

orders : list of integers, or integer

a list of polynomial orders, or a single universal order

direction : {None, 1, -1}

indicates whether the xi are increasing or decreasing +1 indicates increasing -1 indicates decreasing None indicates that it should be deduced from the first two xi


If orders is None, or orders[i] is None, then the degree of the polynomial segment is exactly the degree required to match all i available derivatives at both endpoints. If orders[i] is not None, then some derivatives will be ignored. The code will try to use an equal number of derivatives from each end; if the total number of derivatives needed is odd, it will prefer the rightmost endpoint. If not enough derivatives are available, an exception is raised.

This Page