PCHIP2 library for piecewise hermite interpolation


This is a remake of the old SLATEC PCHIP library with lots of updates, rewrites and enhancements. See short descriptions below, and longer comments inside sources.

pchip2.zip
A zipped archive of the files below.

README
Contains important information.

Makefile
Makefile for the library conforming to GNU Make.

pchip2.h
Simple C header file for the library.

ddistrp.f
Redistributes a specified amount of nodes along a 2D curve, adaptively according to the curvature.

dpchfe.f
Evaluates a PCHI at an array of points. (Dense and piecewise sorted.)

dpchfel.f
Evaluates a PCHI at a single point with binary lookup via dbsrch.

dpchfen.f
A convenience wrapper to use dpchfe for multidimensional interpolants (equivalent to a loop and temporary array).

dpchfd.f
Similar to dpchfe, but evaluates the derivative as well.

dpchfdl.f
Similar to dpchfel, but evaluates the derivative as well.

dpchfdn.f
Similar to dpchfen, but evaluates the derivative as well.

dpchia.f

dpchid.f
Integrates a PCHI over an interval between two nodes.

dpchim.f
Sets up a monotonicity-preserving PCHI.

dpchic.f
Same as dpchim, but provides detailed control of behaviour.

dpchprj.f
Orthogonally projects an array of points onto an n-dimensional PCHI curve.

dpchsp.f
Sets up a twice continuously differentiable PCHI (classic cubic spline).

dchcoef.f
Evaluates coefficients of a CHI on an interval.

dchcrva.f
Approximates curvature integral of a CHI over an interval.

dchfev.f
Evaluates a CHI in an array of points.

dchfdv.f
Evaluates a CHI in an array of points, along with derivative.

dchfie.f
Integrates a CHI over a subinterval.

dlnprj.f
Orthogonal projection of a point onto a segment in n dimensions.

dchprj.f
Orthogonal projects a point onto an n-dimensional CHI.

dbsrch.f
Performs binary search in a sorted array with an initial guess.

dpolev.f
Evaluates a polynomial along with some derivatives via a generalized Horner scheme.

dpchcm.f
Check a PCHI spline for monotonicity.

dpchce.f
Assistant subroutine to dpchic.

dpchci.f
Assistant subroutine to dpchic.

dpchcs.f
Assistant subroutine to dpchic.

dpchdf.f
Assistant subroutine to dpchsp. Finite differences derivative approximation.

dpchst.f
Assistant subroutine, compares signs of two numbers.

dpolri.f
Computes a Laguerre step towards a polynomial root.

dxmoni.f
Test an array for strict monotonicity.

dmchpar.f
Include file to provide machine parameters.

errmsg.f
Error reporting subroutine.


Single precision versions of the above subprograms:
sdistrp.f
spchfe.f
spchfel.f
spchfen.f
spchfd.f
spchfdl.f
spchfdn.f
spchia.f
spchid.f
spchim.f
spchic.f
spchprj.f
spchsp.f
schcoef.f
schcrva.f
schfev.f
schfdv.f
schfie.f
slnprj.f
schprj.f
sbsrch.f
spolev.f
spchcm.f
spchce.f
spchci.f
spchcs.f
spchdf.f
spchst.f
spolri.f
sxmoni.f
smchpar.f