Copyright | (c) Edward Kmett 2010-2014 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
- class (Mode t, Mode (D t), Num (D t)) => Jacobian t where
- type D t :: *
- unary :: (Scalar t -> Scalar t) -> D t -> t -> t
- lift1 :: (Scalar t -> Scalar t) -> (D t -> D t) -> t -> t
- lift1_ :: (Scalar t -> Scalar t) -> (D t -> D t -> D t) -> t -> t
- binary :: (Scalar t -> Scalar t -> Scalar t) -> D t -> D t -> t -> t -> t
- lift2 :: (Scalar t -> Scalar t -> Scalar t) -> (D t -> D t -> (D t, D t)) -> t -> t -> t
- lift2_ :: (Scalar t -> Scalar t -> Scalar t) -> (D t -> D t -> D t -> (D t, D t)) -> t -> t -> t
Documentation
class (Mode t, Mode (D t), Num (D t)) => Jacobian t where Source
Jacobian
is useful for defining new AD primitives in a
fairly generic way.
unary :: (Scalar t -> Scalar t) -> D t -> t -> t Source
lift1 :: (Scalar t -> Scalar t) -> (D t -> D t) -> t -> t Source
lift1_ :: (Scalar t -> Scalar t) -> (D t -> D t -> D t) -> t -> t Source
binary :: (Scalar t -> Scalar t -> Scalar t) -> D t -> D t -> t -> t -> t Source
lift2 :: (Scalar t -> Scalar t -> Scalar t) -> (D t -> D t -> (D t, D t)) -> t -> t -> t Source
lift2_ :: (Scalar t -> Scalar t -> Scalar t) -> (D t -> D t -> D t -> (D t, D t)) -> t -> t -> t Source