interpolation-0.1.1.2: piecewise linear and cubic Hermite interpolation
Safe HaskellSafe-Inferred
LanguageHaskell98

Numeric.Interpolation.Piece

Synopsis

Documentation

type T x y ny = (x, ny) -> (x, ny) -> x -> y Source #

linear :: Fractional a => T a a a Source #

forAllDistinctPoints $ \p1 p2 x -> Piece.linear p1 p2 x == Piece.linear p2 p1 x

hermite1 :: Fractional a => T a a (a, a) Source #

Hermite interpolation with one derivative per node. That is, the interpolating polynomial is cubic.

forAllDistinctPoints $ \p1 p2 x -> Piece.hermite1 p1 p2 x == Piece.hermite1 p2 p1 x
forAllDistinctPoints $ \p1@(x1,y1) p2@(x2,y2) x -> Piece.linear p1 p2 x == let slope = (y2-y1)/(x2-x1) in Piece.hermite1 (x1, (y1,slope)) (x2, (y2,slope)) x
forAllDistinctPoints $ \p1 p2 x -> Piece.hermite1 p1 p2 x == PiecePriv.hermite1 p1 p2 x