ad-4.3.6: Automatic Differentiation

Copyright(c) Edward Kmett 2010-2015
LicenseBSD3
Maintainerekmett@gmail.com
Stabilityexperimental
PortabilityGHC only
Safe HaskellNone
LanguageHaskell2010

Numeric.AD.Jacobian

Description

 
Synopsis

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.

Associated Types

type D t :: * Source #

Methods

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 #

Instances
Jacobian ForwardDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Forward.Double

Associated Types

type D ForwardDouble :: Type Source #

Num a => Jacobian (Tower a) Source # 
Instance details

Defined in Numeric.AD.Internal.Tower

Associated Types

type D (Tower a) :: Type Source #

Methods

unary :: (Scalar (Tower a) -> Scalar (Tower a)) -> D (Tower a) -> Tower a -> Tower a Source #

lift1 :: (Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a)) -> Tower a -> Tower a Source #

lift1_ :: (Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a) -> D (Tower a)) -> Tower a -> Tower a Source #

binary :: (Scalar (Tower a) -> Scalar (Tower a) -> Scalar (Tower a)) -> D (Tower a) -> D (Tower a) -> Tower a -> Tower a -> Tower a Source #

lift2 :: (Scalar (Tower a) -> Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a) -> (D (Tower a), D (Tower a))) -> Tower a -> Tower a -> Tower a Source #

lift2_ :: (Scalar (Tower a) -> Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a) -> D (Tower a) -> (D (Tower a), D (Tower a))) -> Tower a -> Tower a -> Tower a Source #

Num a => Jacobian (Sparse a) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse

Associated Types

type D (Sparse a) :: Type Source #

Methods

unary :: (Scalar (Sparse a) -> Scalar (Sparse a)) -> D (Sparse a) -> Sparse a -> Sparse a Source #

lift1 :: (Scalar (Sparse a) -> Scalar (Sparse a)) -> (D (Sparse a) -> D (Sparse a)) -> Sparse a -> Sparse a Source #

lift1_ :: (Scalar (Sparse a) -> Scalar (Sparse a)) -> (D (Sparse a) -> D (Sparse a) -> D (Sparse a)) -> Sparse a -> Sparse a Source #

binary :: (Scalar (Sparse a) -> Scalar (Sparse a) -> Scalar (Sparse a)) -> D (Sparse a) -> D (Sparse a) -> Sparse a -> Sparse a -> Sparse a Source #

lift2 :: (Scalar (Sparse a) -> Scalar (Sparse a) -> Scalar (Sparse a)) -> (D (Sparse a) -> D (Sparse a) -> (D (Sparse a), D (Sparse a))) -> Sparse a -> Sparse a -> Sparse a Source #

lift2_ :: (Scalar (Sparse a) -> Scalar (Sparse a) -> Scalar (Sparse a)) -> (D (Sparse a) -> D (Sparse a) -> D (Sparse a) -> (D (Sparse a), D (Sparse a))) -> Sparse a -> Sparse a -> Sparse a Source #

Num a => Jacobian (Kahn a) Source # 
Instance details

Defined in Numeric.AD.Internal.Kahn

Associated Types

type D (Kahn a) :: Type Source #

Methods

unary :: (Scalar (Kahn a) -> Scalar (Kahn a)) -> D (Kahn a) -> Kahn a -> Kahn a Source #

lift1 :: (Scalar (Kahn a) -> Scalar (Kahn a)) -> (D (Kahn a) -> D (Kahn a)) -> Kahn a -> Kahn a Source #

lift1_ :: (Scalar (Kahn a) -> Scalar (Kahn a)) -> (D (Kahn a) -> D (Kahn a) -> D (Kahn a)) -> Kahn a -> Kahn a Source #

binary :: (Scalar (Kahn a) -> Scalar (Kahn a) -> Scalar (Kahn a)) -> D (Kahn a) -> D (Kahn a) -> Kahn a -> Kahn a -> Kahn a Source #

lift2 :: (Scalar (Kahn a) -> Scalar (Kahn a) -> Scalar (Kahn a)) -> (D (Kahn a) -> D (Kahn a) -> (D (Kahn a), D (Kahn a))) -> Kahn a -> Kahn a -> Kahn a Source #

lift2_ :: (Scalar (Kahn a) -> Scalar (Kahn a) -> Scalar (Kahn a)) -> (D (Kahn a) -> D (Kahn a) -> D (Kahn a) -> (D (Kahn a), D (Kahn a))) -> Kahn a -> Kahn a -> Kahn a Source #

Num a => Jacobian (Forward a) Source # 
Instance details

Defined in Numeric.AD.Internal.Forward

Associated Types

type D (Forward a) :: Type Source #

Methods

unary :: (Scalar (Forward a) -> Scalar (Forward a)) -> D (Forward a) -> Forward a -> Forward a Source #

lift1 :: (Scalar (Forward a) -> Scalar (Forward a)) -> (D (Forward a) -> D (Forward a)) -> Forward a -> Forward a Source #

lift1_ :: (Scalar (Forward a) -> Scalar (Forward a)) -> (D (Forward a) -> D (Forward a) -> D (Forward a)) -> Forward a -> Forward a Source #

binary :: (Scalar (Forward a) -> Scalar (Forward a) -> Scalar (Forward a)) -> D (Forward a) -> D (Forward a) -> Forward a -> Forward a -> Forward a Source #

lift2 :: (Scalar (Forward a) -> Scalar (Forward a) -> Scalar (Forward a)) -> (D (Forward a) -> D (Forward a) -> (D (Forward a), D (Forward a))) -> Forward a -> Forward a -> Forward a Source #

lift2_ :: (Scalar (Forward a) -> Scalar (Forward a) -> Scalar (Forward a)) -> (D (Forward a) -> D (Forward a) -> D (Forward a) -> (D (Forward a), D (Forward a))) -> Forward a -> Forward a -> Forward a Source #

(Reifies s Tape, Num a) => Jacobian (Reverse s a) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse

Associated Types

type D (Reverse s a) :: Type Source #

Methods

unary :: (Scalar (Reverse s a) -> Scalar (Reverse s a)) -> D (Reverse s a) -> Reverse s a -> Reverse s a Source #

lift1 :: (Scalar (Reverse s a) -> Scalar (Reverse s a)) -> (D (Reverse s a) -> D (Reverse s a)) -> Reverse s a -> Reverse s a Source #

lift1_ :: (Scalar (Reverse s a) -> Scalar (Reverse s a)) -> (D (Reverse s a) -> D (Reverse s a) -> D (Reverse s a)) -> Reverse s a -> Reverse s a Source #

binary :: (Scalar (Reverse s a) -> Scalar (Reverse s a) -> Scalar (Reverse s a)) -> D (Reverse s a) -> D (Reverse s a) -> Reverse s a -> Reverse s a -> Reverse s a Source #

lift2 :: (Scalar (Reverse s a) -> Scalar (Reverse s a) -> Scalar (Reverse s a)) -> (D (Reverse s a) -> D (Reverse s a) -> (D (Reverse s a), D (Reverse s a))) -> Reverse s a -> Reverse s a -> Reverse s a Source #

lift2_ :: (Scalar (Reverse s a) -> Scalar (Reverse s a) -> Scalar (Reverse s a)) -> (D (Reverse s a) -> D (Reverse s a) -> D (Reverse s a) -> (D (Reverse s a), D (Reverse s a))) -> Reverse s a -> Reverse s a -> Reverse s a Source #

(Traversable f, Num a) => Jacobian (Dense f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense

Associated Types

type D (Dense f a) :: Type Source #

Methods

unary :: (Scalar (Dense f a) -> Scalar (Dense f a)) -> D (Dense f a) -> Dense f a -> Dense f a Source #

lift1 :: (Scalar (Dense f a) -> Scalar (Dense f a)) -> (D (Dense f a) -> D (Dense f a)) -> Dense f a -> Dense f a Source #

lift1_ :: (Scalar (Dense f a) -> Scalar (Dense f a)) -> (D (Dense f a) -> D (Dense f a) -> D (Dense f a)) -> Dense f a -> Dense f a Source #

binary :: (Scalar (Dense f a) -> Scalar (Dense f a) -> Scalar (Dense f a)) -> D (Dense f a) -> D (Dense f a) -> Dense f a -> Dense f a -> Dense f a Source #

lift2 :: (Scalar (Dense f a) -> Scalar (Dense f a) -> Scalar (Dense f a)) -> (D (Dense f a) -> D (Dense f a) -> (D (Dense f a), D (Dense f a))) -> Dense f a -> Dense f a -> Dense f a Source #

lift2_ :: (Scalar (Dense f a) -> Scalar (Dense f a) -> Scalar (Dense f a)) -> (D (Dense f a) -> D (Dense f a) -> D (Dense f a) -> (D (Dense f a), D (Dense f a))) -> Dense f a -> Dense f a -> Dense f a Source #