vector-space-0.1.2: Vector & affine spaces, plus derivativesSource codeContentsIndex
Data.Derivative
Stabilityexperimental
Maintainerconal@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)
show/hide 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 :> bSource
Infinitely differentiable functions
dZero :: VectorSpace b s => a :> bSource
Derivative tower full of zeroV.
dConst :: VectorSpace b s => b -> a :> bSource
Constant derivative tower.
idD :: VectorSpace u s => u :~> uSource
Differentiable identity function. Sometimes called the derivation variable or similar, but it's not really a variable.
fstD :: VectorSpace a s => (a, b) :~> aSource
Differentiable version of fst
sndD :: VectorSpace b s => (a, b) :~> bSource
Differentiable version of snd
linearD :: VectorSpace v s => (u :-* v) -> u :~> vSource
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 :> uSource
Derivative tower for applying a binary function that distributes over addition, such as multiplication.
(@.) :: (b :~> c) -> (a :~> b) -> a :~> cSource
Chain rule.
(>-<) :: VectorSpace u s => (u -> u) -> ((a :> u) -> a :> s) -> (a :> u) -> a :> uSource
Specialized chain rule.
Produced by Haddock version 2.4.2