ad-4.4.1: Automatic Differentiation

Safe HaskellNone
LanguageHaskell2010

Numeric.AD.Internal.Reverse.Double

Synopsis

Documentation

data ReverseDouble s where Source #

Instances
Reifies s Tape => Enum (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 => Floating (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 => Num (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

Reifies s Tape => Real (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 => 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 => Mode (ReverseDouble s) Source # 
Instance details

Defined in Numeric.AD.Internal.Reverse.Double

Associated Types

type Scalar (ReverseDouble s) :: Type Source #

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

Defined in Numeric.AD.Internal.Reverse.Double

Associated Types

type D (ReverseDouble s) :: Type Source #

type Scalar (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

newtype Tape Source #

Constructors

Tape 

Fields

data Head Source #

Constructors

Head !Int Cells 

data Cells where Source #

Constructors

Nil :: Cells 
Unary :: !Int -> Double -> Cells -> Cells 
Binary :: !Int -> !Int -> Double -> Double -> Cells -> Cells 

reifyTape :: Int -> (forall s. Reifies s Tape => 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 #