Portability | GHC only |
---|---|

Stability | experimental |

Maintainer | ekmett@gmail.com |

Safe Haskell | None |

- 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 whereSource

`Jacobian`

is useful for defining new AD primitives in a
fairly generic way.

unary :: (Scalar t -> Scalar t) -> D t -> t -> tSource

lift1 :: (Scalar t -> Scalar t) -> (D t -> D t) -> t -> tSource

lift1_ :: (Scalar t -> Scalar t) -> (D t -> D t -> D t) -> t -> tSource

binary :: (Scalar t -> Scalar t -> Scalar t) -> D t -> D t -> t -> t -> tSource

lift2 :: (Scalar t -> Scalar t -> Scalar t) -> (D t -> D t -> (D t, D t)) -> t -> t -> tSource

lift2_ :: (Scalar t -> Scalar t -> Scalar t) -> (D t -> D t -> D t -> (D t, D t)) -> t -> t -> tSource