forked from scipy/scipy-articles
/
poly.tex
30 lines (27 loc) · 1.76 KB
/
poly.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Historically, SciPy relied heavily on the venerable FITPACK
Fortran library by P.~Dierckx \cite{Dierckx:1993:CSF:151103, FITPACK} for
univariate interpolation and approximation of data, but the original monolithic
design and API for interaction between SciPy and FITPACK was limiting for both
users and developers.
Implementing a new, modular design of polynomial interpolators was spread over
several releases. The goals of this effort were to have a set of basic objects
representing piecewise polynomials, to implement a collection of algorithms
for constructing various interpolators, and to provide users with building
blocks for constructing additional interpolators.
At the lowest level of the new design are classes which represent univariate
piecewise polynomials: \code{PPoly} (SciPy~0.13)\cite{scipy-gh2885},
\code{BPoly} (SciPy~0.13) and \code{BSpline} (SciPy~0.19)\cite{scipy-gh3174},
which allow
efficient vectorized evaluations, differentiation, integration and root-finding.
\code{PPoly} represents piecewise polynomials in the power basis in terms of
breakpoints and coefficients at each interval. \code{BPoly} is similar, and
represents piecewise polynomials in the Bernstein basis (which is suitable
for e.g., constructing B\'{e}zier curves). \code{BSpline} represents spline
curves, i.e., linear combinations of B-spline basis elements.\cite{deBoor1978}
In the next layer, these polynomial classes are used for constructing several
common ways of interpolating data: \code{CubicSpline} (SciPy~0.18)
\cite{scipy-gh5653} constructs a twice
differentiable piecewise cubic function, \code{Akima1DInterpolator}
and \code{PCHIPInterpolator} implement two classic prescriptions for
constructing a $C^1$ continuous monotone shape-preserving interpolator.
\cite{FritschCarlson1980, Akima1970}