Portability | GHC only |
---|---|
Stability | experimental |
Maintainer | ekmett@gmail.com |
Higher order derivatives via a "dual number tower".
- grad :: (Traversable f, Num a) => FU f a -> f a -> f a
- grad' :: (Traversable f, Num a) => FU f a -> f a -> (a, f a)
- gradWith :: (Traversable f, Num a) => (a -> a -> b) -> FU f a -> f a -> f b
- gradWith' :: (Traversable f, Num a) => (a -> a -> b) -> FU f a -> f a -> (a, f b)
- grads :: (Traversable f, Num a) => FU f a -> f a -> Cofree f a
- jacobian :: (Traversable f, Functor g, Num a) => FF f g a -> f a -> g (f a)
- jacobian' :: (Traversable f, Functor g, Num a) => FF f g a -> f a -> g (a, f a)
- jacobianWith :: (Traversable f, Functor g, Num a) => (a -> a -> b) -> FF f g a -> f a -> g (f b)
- jacobianWith' :: (Traversable f, Functor g, Num a) => (a -> a -> b) -> FF f g a -> f a -> g (a, f b)
- jacobians :: (Traversable f, Functor g, Num a) => FF f g a -> f a -> g (Cofree f a)
- hessian :: (Traversable f, Num a) => FU f a -> f a -> f (f a)
- hessian' :: (Traversable f, Num a) => FU f a -> f a -> (a, f (a, f a))
- hessianF :: (Traversable f, Functor g, Num a) => FF f g a -> f a -> g (f (f a))
- hessianF' :: (Traversable f, Functor g, Num a) => FF f g a -> f a -> g (a, f (a, f a))
- vgrad :: Grad i o o' a => i -> o
- vgrads :: Grads i o a => i -> o
- module Numeric.AD.Types
- class Lifted t => Mode t where
- class Num a => Grad i o o' a | i -> a o o', o -> a i o', o' -> a i o
- class Num a => Grads i o a | i -> a o, o -> a i
Sparse Gradients
grad :: (Traversable f, Num a) => FU f a -> f a -> f aSource
grad' :: (Traversable f, Num a) => FU f a -> f a -> (a, f a)Source
gradWith :: (Traversable f, Num a) => (a -> a -> b) -> FU f a -> f a -> f bSource
gradWith' :: (Traversable f, Num a) => (a -> a -> b) -> FU f a -> f a -> (a, f b)Source
Sparse Jacobians (synonyms)
jacobianWith :: (Traversable f, Functor g, Num a) => (a -> a -> b) -> FF f g a -> f a -> g (f b)Source
jacobianWith' :: (Traversable f, Functor g, Num a) => (a -> a -> b) -> FF f g a -> f a -> g (a, f b)Source
Sparse Hessians
hessian :: (Traversable f, Num a) => FU f a -> f a -> f (f a)Source
hessian' :: (Traversable f, Num a) => FU f a -> f a -> (a, f (a, f a))Source
Unsafe gradients
Exposed Types
module Numeric.AD.Types
class Lifted t => Mode t whereSource
lift :: Num a => a -> t aSource
Embed a constant
(<+>) :: Num a => t a -> t a -> t aSource
Vector sum
(*^) :: Num a => a -> t a -> t aSource
Scalar-vector multiplication
(^*) :: Num a => t a -> a -> t aSource
Vector-scalar multiplication
(^/) :: Fractional a => t a -> a -> t aSource
Scalar division
'zero' = 'lift' 0