Safe Haskell | None |
---|
- newtype Index = Index (IntMap Int)
- emptyIndex :: Index
- addToIndex :: Int -> Index -> Index
- indices :: Index -> [Int]
- data Sparse a s
- apply :: (Traversable f, Num a) => (f (Sparse a s) -> b) -> f a -> b
- vars :: (Traversable f, Num a) => f a -> f (Sparse a s)
- d :: (Traversable f, Num a) => f b -> Sparse a s -> f a
- d' :: (Traversable f, Num a) => f a -> Sparse a s -> (a, f a)
- ds :: (Traversable f, Num a) => f b -> Sparse a s -> Cofree f a
- skeleton :: Traversable f => f a -> f Int
- spartial :: Num a => [Int] -> Sparse a s -> Maybe a
- partial :: Num a => [Int] -> Sparse a s -> a
- vgrad :: Grad i o o' a => i -> o
- vgrad' :: Grad i o o' a => i -> o'
- vgrads :: Grads i o a => i -> o
- class Num a => Grad i o o' a | i -> a o o', o -> a i o', o' -> a i o where
- class Num a => Grads i o a | i -> a o, o -> a i where
Documentation
addToIndex :: Int -> Index -> IndexSource
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.
Typeable2 Sparse | |
(Num a, Bounded a) => Bounded (Sparse a s) | |
(Num a, Enum a) => Enum (Sparse a s) | |
(Num a, Eq a) => Eq (Sparse a s) | |
Floating a => Floating (Sparse a s) | |
Fractional a => Fractional (Sparse a s) | |
(Data a, Data s) => Data (Sparse a s) | |
Num a => Num (Sparse a s) | |
(Num a, Ord a) => Ord (Sparse a s) | |
Real a => Real (Sparse a s) | |
RealFloat a => RealFloat (Sparse a s) | |
RealFrac a => RealFrac (Sparse a s) | |
Show a => Show (Sparse a s) | |
Erf a => Erf (Sparse a s) | |
InvErf a => InvErf (Sparse a s) | |
Num a => Mode (Sparse a s) | |
Num a => Jacobian (Sparse a s) | |
Num a => Grad (Sparse a ()) [a] (a, [a]) a | |
Grads i o a => Grads (Sparse a () -> i) (a -> o) a | |
Num a => Grads (Sparse a ()) (Cofree [] a) a | |
Grad i o o' a => Grad (Sparse a () -> i) (a -> o) (a -> o') a |
apply :: (Traversable f, Num a) => (f (Sparse a s) -> b) -> f a -> bSource
vars :: (Traversable f, Num a) => f a -> f (Sparse a s)Source
d :: (Traversable f, Num a) => f b -> Sparse a s -> f aSource
d' :: (Traversable f, Num a) => f a -> Sparse a s -> (a, f a)Source
skeleton :: Traversable f => f a -> f IntSource