-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | piecewise linear and cubic Hermite interpolation
--
@package interpolation
@version 0.1
module Numeric.Interpolation.Piece
type T x y ny = (x, ny) -> (x, ny) -> x -> y
linear :: Fractional a => T a a a
-- | Hermite interpolation with one derivative per node. That is, the
-- interpolating polynomial is cubic.
hermite1 :: Fractional a => T a a (a, a)
module Numeric.Interpolation.NodeList
data T x y
Interval :: T x y
Node :: (x, y) -> (T x y) -> (T x y) -> T x y
-- | list must be sorted with respect to first element
fromList :: [(x, y)] -> T x y
toList :: T x y -> [(x, y)]
singleton :: x -> y -> T x y
lookup :: Ord x => T x y -> x -> (Maybe (x, y), Maybe (x, y))
instance (Eq x, Eq y) => Eq (T x y)
instance (Ord x, Ord y) => Ord (T x y)
instance (Show x, Show y) => Show (T x y)
instance Traversable (T x)
instance Foldable (T x)
instance Functor (T x)
module Numeric.Interpolation.Sample
type T x y = [x] -> x -> [(Int, y)]
linear :: (Fractional a, Ord a) => T a a
hermite1 :: (Fractional a, Ord a) => T a a
cubicLinear :: (Fractional a, Ord a) => T a a
cubicParabola :: (Fractional a, Ord a) => T a a
module Numeric.Interpolation.Basis.Compact
linear :: Num b => [a] -> [T a b]
hermite1 :: Num b => [a] -> [T a (b, b)]
-- | Cubic interpolation where the derivative at a node is set to the slope
-- of the two adjacent nodes.
cubicLinear :: Fractional a => [a] -> [T a (a, a)]
-- | Cubic interpolation where the derivative at a node is set to the slope
-- of the parabola through the current and the two adjacent nodes.
cubicParabola :: Fractional a => [a] -> [T a (a, a)]
module Numeric.Interpolation.Basis
linear :: Num b => [a] -> [T a b]
hermite1 :: Num b => [a] -> [T a (b, b)]
-- | Cubic interpolation where the derivative at a node is set to the slope
-- of the two adjacent nodes.
cubicLinear :: Fractional a => [a] -> [T a (a, a)]
-- | Cubic interpolation where the derivative at a node is set to the slope
-- of the parabola through the current and the two adjacent nodes.
cubicParabola :: Fractional a => [a] -> [T a (a, a)]
-- | coefficientsToLinear nodes coefficients creates an
-- interpolation function for nodes, where the
-- coefficients correspond to the basis functions constructed
-- with Basis.linear nodes.
coefficientsToLinear :: [a] -> [b] -> T a b
-- | Cf. coefficientsToLinear
coefficientsToHermite1 :: [a] -> [b] -> T a (b, b)
-- | Cf. coefficientsToLinear
coefficientsToCubicLinear :: Fractional a => [a] -> [a] -> T a (a, a)
-- | Cf. coefficientsToLinear
coefficientsToCubicParabola :: Fractional a => [a] -> [a] -> T a (a, a)
module Numeric.Interpolation.Type
data T x y ny
Cons :: ([x] -> [y] -> String) -> T x y ny -> Int -> ([x] -> [T x ny]) -> ([x] -> x -> [(Int, y)]) -> ([x] -> [y] -> T x ny) -> (ny -> y) -> T x y ny
ssvFromNodes :: T x y ny -> [x] -> [y] -> String
interpolatePiece :: T x y ny -> T x y ny
-- | maximum difference of indices of basis functions that overlap plus one
basisOverlap :: T x y ny -> Int
basisFunctions :: T x y ny -> [x] -> [T x ny]
sampleBasisFunctions :: T x y ny -> [x] -> x -> [(Int, y)]
coefficientsToInterpolator :: T x y ny -> [x] -> [y] -> T x ny
valueFromNode :: T x y ny -> ny -> y
linear :: (Fractional a, Ord a, Show a) => T a a a
hermite1 :: (Fractional a, Ord a, Show a) => T a a (a, a)
cubicLinear :: (Fractional a, Ord a, Show a) => T a a (a, a)
cubicParabola :: (Fractional a, Ord a, Show a) => T a a (a, a)
module Numeric.Interpolation.Piecewise
-- | It is a checked error to interpolate outside of the range of nodes.
interpolate :: Ord x => T x y ny -> T x ny -> x -> y
-- | Outside the range of nodes the interpolation function takes the value
-- of the respective border.
interpolateConstantExt :: Ord x => T x y ny -> T x ny -> x -> y
module Numeric.Interpolation.Basis.Full
linear :: Num b => [a] -> [T a b]
hermite1 :: Num b => [a] -> [T a (b, b)]