spline, a FORTRAN90 code which defines and evaluates spline functions.
These spline functions are typically used to:
The most common use of this software is for situations where a set of (X,Y) data points is known, and it is desired to determine a smooth function which passes exactly through those points, and which can be evaluated everywhere. Thus, it is possible to get a formula that allows you to "connect the dots".
Of course, you could could just connect the dots with straight lines, but that would look ugly, and if there really is some function that explains your data, you'd expect it to curve around rather than make sudden angular turns. The functions in SPLINE offer a variety of choices for slinky curves that will make pleasing interpolants of your data.
There are a variety of types of approximation curves available, including:
Also included are a set of routines that return the local "basis matrix", which allows the evaluation of the spline in terms of local function data.
The computer code and data files described and made available on this web page are distributed under the MIT license
spline is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
BERNSTEIN_POLYNOMIAL, a FORTRAN90 code which evaluates the Bernstein polynomials, useful for uniform approximation of functions;
CHEBYSHEV, a FORTRAN90 code which computes the Chebyshev interpolant/approximant to a given function over an interval.
DIVDIF, a FORTRAN90 code which uses divided differences to interpolate data.
HERMITE, a FORTRAN90 code which computes the Hermite interpolant, a polynomial that matches function values and derivatives.
HERMITE_CUBIC, a FORTRAN90 code which can compute the value, derivatives or integral of a Hermite cubic polynomial, or manipulate an interpolating function made up of piecewise Hermite cubic polynomials.
INTERP, a FORTRAN90 code which can be used for parameterizing and interpolating data;
LAGRANGE_APPROX_1D, a FORTRAN90 code which defines and evaluates the Lagrange polynomial p(x) of degree m which approximates a set of nd data points (x(i),y(i)).
LAGRANGE_INTERP_1D, a FORTRAN90 code which defines and evaluates the Lagrange polynomial p(x) which interpolates a set of data, so that p(x(i)) = y(i).
NMS, a FORTRAN90 code which includes a wide variety of numerical software, including solvers for linear systems of equations, interpolation of data, numerical quadrature, linear least squares data fitting, the solution of nonlinear equations, ordinary differential equations, optimization and nonlinear least squares, simulation and random numbers, trigonometric approximation and Fast Fourier Transforms.
PPPACK, a FORTRAN90 code which implements piecewise polynomial functions, including, in particular, cubic splines, by Carl deBoor.
TEST_APPROX, a FORTRAN90 code which defines a number of test problems for approximation and interpolation.
TEST_INTERP_1D, a FORTRAN90 code which defines test problems for interpolation of data y(x), depending on a 1D argument.
TOMS446,
a FORTRAN90 code which
manipulates Chebyshev series for interpolation and approximation;
this is a version of ACM TOMS algorithm 446,
by Roger Broucke.