ad-4.2.1.1: Automatic Differentiation

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

Numeric.AD.Mode

Contents

Description

 

Synopsis

AD modes

class (Num t, Num (Scalar t)) => Mode t where Source

Minimal complete definition

auto

Associated Types

type Scalar t Source

Methods

isKnownConstant :: t -> Bool Source

allowed to return False for items with a zero derivative, but we'll give more NaNs than strictly necessary

isKnownZero :: t -> Bool Source

allowed to return False for zero, but we give more NaN's than strictly necessary then

auto :: Scalar t -> t Source

Embed a constant

(*^) :: Scalar t -> t -> t infixr 7 Source

Scalar-vector multiplication

(^*) :: t -> Scalar t -> t infixl 7 Source

Vector-scalar multiplication

(^/) :: Fractional (Scalar t) => t -> Scalar t -> t infixr 7 Source

Scalar division

zero :: t Source

zero = lift 0

Instances

Mode Double 
Mode Float 
Mode Int 
Mode Int8 
Mode Int16 
Mode Int32 
Mode Int64 
Mode Integer 
Mode Word 
Mode Word8 
Mode Word16 
Mode Word32 
Mode Word64 
Mode Natural 
Mode ForwardDouble 
Integral a => Mode (Ratio a) 
RealFloat a => Mode (Complex a) 
Num a => Mode (Id a) 
Num a => Mode (Tower a) 
Num a => Mode (Sparse a) 
(Mode t, Mode (Scalar t)) => Mode (On t) 
Num a => Mode (Kahn a) 
Num a => Mode (Forward a) 
(Num a, Traversable f) => Mode (Dense f a) 
Mode a => Mode (AD s a) 
(Reifies * s Tape, Num a) => Mode (Reverse s a) 
(Mode a, Mode b, Chosen s, (~) * (Scalar a) (Scalar b)) => Mode (Or s a b)