Data.Derivative
 Stability experimental Maintainer conal@conal.net
Description
Infinite derivative towers via linear maps. See blog posts http://conal.net/blog/tag/derivatives/
Synopsis
data a :> b = D {
 dVal :: b dDeriv :: a :-* (a :> b)
}
type :~> a b = a -> a :> b
dZero :: VectorSpace b s => a :> b
dConst :: VectorSpace b s => b -> a :> b
idD :: VectorSpace u s => u :~> u
fstD :: VectorSpace a s => (a, b) :~> a
sndD :: VectorSpace b s => (a, b) :~> b
linearD :: VectorSpace v s => (u :-* v) -> u :~> v
distribD :: VectorSpace u s => (b -> c -> u) -> ((a :> b) -> (a :> c) -> a :> u) -> (a :> b) -> (a :> c) -> a :> u
(@.) :: (b :~> c) -> (a :~> b) -> a :~> c
(>-<) :: VectorSpace u s => (u -> u) -> ((a :> u) -> a :> s) -> (a :> u) -> a :> u
Documentation
 data a :> b Source

Tower of derivatives.

Warning, the Applicative instance is missing its pure (due to a VectorSpace type constraint). Use dConst instead.

Constructors
D
 dVal :: b dDeriv :: a :-* (a :> b)
Instances
 Functor (:> a) Applicative (:> a) Eq b => Eq (a :> b) (Floating b, VectorSpace b b) => Floating (a :> b) (Fractional b, VectorSpace b b) => Fractional (a :> b) (Num b, VectorSpace b b) => Num (a :> b) Ord b => Ord (a :> b) Show b => Show (a :> b) VectorSpace u s => VectorSpace (a :> u) (a :> s)
 type :~> a b = a -> a :> b Source
Infinitely differentiable functions
 dZero :: VectorSpace b s => a :> b Source
Derivative tower full of zeroV.
 dConst :: VectorSpace b s => b -> a :> b Source
Constant derivative tower.
 idD :: VectorSpace u s => u :~> u Source
Differentiable identity function. Sometimes called the derivation variable or similar, but it's not really a variable.
 fstD :: VectorSpace a s => (a, b) :~> a Source
Differentiable version of fst
 sndD :: VectorSpace b s => (a, b) :~> b Source
Differentiable version of snd
 linearD :: VectorSpace v s => (u :-* v) -> u :~> v Source
Every linear function has a constant derivative equal to the function itself (as a linear map).
 distribD :: VectorSpace u s => (b -> c -> u) -> ((a :> b) -> (a :> c) -> a :> u) -> (a :> b) -> (a :> c) -> a :> u Source
Derivative tower for applying a binary function that distributes over addition, such as multiplication.
 (@.) :: (b :~> c) -> (a :~> b) -> a :~> c Source
Chain rule.
 (>-<) :: VectorSpace u s => (u -> u) -> ((a :> u) -> a :> s) -> (a :> u) -> a :> u Source
Specialized chain rule.