ad-0.40: Automatic Differentiation




newtype Index Source


Index (IntMap Int) 

data Sparse a Source

We only store partials in sorted order, so the map contained in a partial will only contain partials with equal or greater keys to that of the map in which it was found. This should be key for efficiently computing sparse hessians. there are only (n + k - 1) choose k distinct nth partial derivatives of a function with k inputs.


Sparse a (IntMap (Sparse a)) 

vars :: (Traversable f, Num a) => f a -> f (AD Sparse a)Source

d :: (Traversable f, Num a) => f b -> AD Sparse a -> f aSource

d' :: (Traversable f, Num a) => f a -> AD Sparse a -> (a, f a)Source

ds :: (Traversable f, Num a) => f b -> AD Sparse a -> Stream f aSource

skeleton :: Traversable f => f a -> f IntSource

spartial :: Num a => [Int] -> Sparse a -> Maybe aSource

partial :: Num a => [Int] -> Sparse a -> aSource