Portability | GHC only |
---|---|
Stability | experimental |
Maintainer | ekmett@gmail.com |
Safe Haskell | None |
- newtype ComposeFunctor f g a = ComposeFunctor {
- decomposeFunctor :: f (g a)
- newtype ComposeMode f g a = ComposeMode {
- runComposeMode :: f (AD g a)
- composeMode :: AD f (AD g a) -> AD (ComposeMode f g) a
- decomposeMode :: AD (ComposeMode f g) a -> AD f (AD g a)
Documentation
newtype ComposeFunctor f g a Source
Functor composition, used to nest the use of jacobian and grad
ComposeFunctor | |
|
(Functor f, Functor g) => Functor (ComposeFunctor f g) | |
(Typeable1 f, Typeable1 g) => Typeable1 (ComposeFunctor f g) | |
(Foldable f, Foldable g) => Foldable (ComposeFunctor f g) | |
(Traversable f, Traversable g) => Traversable (ComposeFunctor f g) | |
(Typeable1 f, Typeable1 g, Data (f (g a)), Data a) => Data (ComposeFunctor f g a) |
newtype ComposeMode f g a Source
The composition of two AD modes is an AD mode in its own right
ComposeMode | |
|
(Typeable1 f, Typeable1 g) => Typeable1 (ComposeMode f g) | |
(Primal f, Mode g, Primal g) => Primal (ComposeMode f g) | |
(Mode f, Mode g) => Mode (ComposeMode f g) | |
(Mode f, Mode g) => Lifted (ComposeMode f g) | |
(Typeable1 f, Typeable1 g, Data (f (AD g a)), Data a) => Data (ComposeMode f g a) | |
(Typeable1 f, Typeable1 g, Typeable a) => Typeable (ComposeMode f g a) |
composeMode :: AD f (AD g a) -> AD (ComposeMode f g) aSource
decomposeMode :: AD (ComposeMode f g) a -> AD f (AD g a)Source