@hackage / interpolation

piecewise linear and cubic Hermite interpolation

Latest0.1.1.2

About

Metadata

  • Last updated , by HenningThielemann
  • License BSD-3-Clause
  • Categories Mathematics
  • Maintained by: Henning Thielemann <haskell@henning-thielemann.de>

  • Lottery factor: 0

Links

Installation

Package Flags

Use the -f option with cabal commands to enable flags

    buildexamples (off by default)

    Build example executables

    lapack (on by default)

    Build examples that depend on lapack

Readme

Represent real functions by linear or cubic polynomial segments. The package provides both data structures for efficient lookup of interpolation intervals, and computation of basis functions.

There are two examples that can be built with

cabal install -fbuildExamples
  • example/Plot.hs: Interpolate a sinus curve using piecewise linear interpolation and piecewise Hermite cubic interpolation. For the latter one we provide the derivatives of the sinus function at the interpolation nodes.

  • example/Fit.hs: Demonstrates how to use the basis functions for fitting an interpolation function to a given function using a linear least squares solver like from lapack. We use a distorted sinus as target.

The package needs only Haskell 98. Most of the package dependencies are only needed for the examples and are only installed if you enable to build them.