ad-4.5.6: Automatic Differentiation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.AD.Internal.Reverse.Double

Synopsis

Documentation

data ReverseDouble s where Source #

Constructors

Zero :: ReverseDouble s 
Lift :: !Double -> ReverseDouble s 
ReverseDouble :: !Int -> !Double -> ReverseDouble s 

Instances

Instances details
Reifies s Tape => Jacobian (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Associated Types

type D (ReverseDouble s) Source #

Reifies s Tape => Mode (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Associated Types

type Scalar (ReverseDouble s) Source #

Reifies s Tape => Enum (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Floating (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => RealFloat (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Num (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Fractional (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Real (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => RealFrac (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Show (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Erf (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => InvErf (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Eq (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Reifies s Tape => Ord (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

type D (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

type Scalar (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

newtype Tape Source #

Constructors

Tape 

Fields

reifyTape :: Int -> (forall s. Reifies s Tape => Proxy s -> r) -> r Source #

Construct a tape that starts with n variables.

reifyTypeableTape :: Int -> (forall s. (Reifies s Tape, Typeable s) => Proxy s -> r) -> r Source #

Construct a tape that starts with n variables.

partials :: forall s. Reifies s Tape => ReverseDouble s -> [Double] Source #

Extract the partials from the current chain for a given AD variable.

partialArrayOf :: Reifies s Tape => Proxy s -> (Int, Int) -> ReverseDouble s -> Array Int Double Source #

Return an Array of partials given bounds for the variable IDs.

partialMapOf :: Reifies s Tape => Proxy s -> ReverseDouble s -> IntMap Double Source #

Return an IntMap of sparse partials

derivativeOf :: Reifies s Tape => Proxy s -> ReverseDouble s -> Double Source #

Helper that extracts the derivative of a chain when the chain was constructed with 1 variable.

derivativeOf' :: Reifies s Tape => Proxy s -> ReverseDouble s -> (Double, Double) Source #

Helper that extracts both the primal and derivative of a chain when the chain was constructed with 1 variable.

bind :: Traversable f => f Double -> (f (ReverseDouble s), (Int, Int)) Source #

unbindWith :: Functor f => (Double -> b -> c) -> f (ReverseDouble s) -> Array Int b -> f c Source #

unbindMapWithDefault :: Functor f => b -> (Double -> b -> c) -> f (ReverseDouble s) -> IntMap b -> f c Source #