Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- type T x y ny = (x, ny) -> (x, ny) -> x -> y
- linear :: Fractional a => T a a a
- hermite1 :: Fractional a => T a a (a, a)
Documentation
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