ad-4.3.2.1: Automatic Differentiation

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

Numeric.AD.Internal.Forward

Description

Unsafe and often partial combinators intended for internal usage.

Handle with care.

Synopsis

Documentation

data Forward a Source #

Forward mode AD

Constructors

Forward !a a 
Lift !a 
Zero 

Instances

(Num a, Bounded a) => Bounded (Forward a) # 
(Num a, Enum a) => Enum (Forward a) # 

Methods

succ :: Forward a -> Forward a #

pred :: Forward a -> Forward a #

toEnum :: Int -> Forward a #

fromEnum :: Forward a -> Int #

enumFrom :: Forward a -> [Forward a] #

enumFromThen :: Forward a -> Forward a -> [Forward a] #

enumFromTo :: Forward a -> Forward a -> [Forward a] #

enumFromThenTo :: Forward a -> Forward a -> Forward a -> [Forward a] #

(Num a, Eq a) => Eq (Forward a) # 

Methods

(==) :: Forward a -> Forward a -> Bool #

(/=) :: Forward a -> Forward a -> Bool #

Floating a => Floating (Forward a) # 

Methods

pi :: Forward a #

exp :: Forward a -> Forward a #

log :: Forward a -> Forward a #

sqrt :: Forward a -> Forward a #

(**) :: Forward a -> Forward a -> Forward a #

logBase :: Forward a -> Forward a -> Forward a #

sin :: Forward a -> Forward a #

cos :: Forward a -> Forward a #

tan :: Forward a -> Forward a #

asin :: Forward a -> Forward a #

acos :: Forward a -> Forward a #

atan :: Forward a -> Forward a #

sinh :: Forward a -> Forward a #

cosh :: Forward a -> Forward a #

tanh :: Forward a -> Forward a #

asinh :: Forward a -> Forward a #

acosh :: Forward a -> Forward a #

atanh :: Forward a -> Forward a #

log1p :: Forward a -> Forward a #

expm1 :: Forward a -> Forward a #

log1pexp :: Forward a -> Forward a #

log1mexp :: Forward a -> Forward a #

Fractional a => Fractional (Forward a) # 

Methods

(/) :: Forward a -> Forward a -> Forward a #

recip :: Forward a -> Forward a #

fromRational :: Rational -> Forward a #

Data a => Data (Forward a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Forward a -> c (Forward a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Forward a) #

toConstr :: Forward a -> Constr #

dataTypeOf :: Forward a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Forward a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Forward a)) #

gmapT :: (forall b. Data b => b -> b) -> Forward a -> Forward a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Forward a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Forward a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Forward a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Forward a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Forward a -> m (Forward a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Forward a -> m (Forward a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Forward a -> m (Forward a) #

Num a => Num (Forward a) # 

Methods

(+) :: Forward a -> Forward a -> Forward a #

(-) :: Forward a -> Forward a -> Forward a #

(*) :: Forward a -> Forward a -> Forward a #

negate :: Forward a -> Forward a #

abs :: Forward a -> Forward a #

signum :: Forward a -> Forward a #

fromInteger :: Integer -> Forward a #

(Num a, Ord a) => Ord (Forward a) # 

Methods

compare :: Forward a -> Forward a -> Ordering #

(<) :: Forward a -> Forward a -> Bool #

(<=) :: Forward a -> Forward a -> Bool #

(>) :: Forward a -> Forward a -> Bool #

(>=) :: Forward a -> Forward a -> Bool #

max :: Forward a -> Forward a -> Forward a #

min :: Forward a -> Forward a -> Forward a #

Real a => Real (Forward a) # 

Methods

toRational :: Forward a -> Rational #

RealFloat a => RealFloat (Forward a) # 
RealFrac a => RealFrac (Forward a) # 

Methods

properFraction :: Integral b => Forward a -> (b, Forward a) #

truncate :: Integral b => Forward a -> b #

round :: Integral b => Forward a -> b #

ceiling :: Integral b => Forward a -> b #

floor :: Integral b => Forward a -> b #

Show a => Show (Forward a) Source # 

Methods

showsPrec :: Int -> Forward a -> ShowS #

show :: Forward a -> String #

showList :: [Forward a] -> ShowS #

Erf a => Erf (Forward a) # 

Methods

erf :: Forward a -> Forward a #

erfc :: Forward a -> Forward a #

erfcx :: Forward a -> Forward a #

normcdf :: Forward a -> Forward a #

InvErf a => InvErf (Forward a) # 

Methods

inverf :: Forward a -> Forward a #

inverfc :: Forward a -> Forward a #

invnormcdf :: Forward a -> Forward a #

Num a => Mode (Forward a) Source # 
Num a => Jacobian (Forward a) Source # 

Associated Types

type D (Forward a) :: * 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 #

type Scalar (Forward a) Source # 
type Scalar (Forward a) = a
type D (Forward a) Source # 
type D (Forward a) = Id a

primal :: Num a => Forward a -> a Source #

tangent :: Num a => Forward a -> a Source #

Calculate the tangent using forward mode AD.

bundle :: a -> a -> Forward a Source #

unbundle :: Num a => Forward a -> (a, a) Source #

apply :: Num a => (Forward a -> b) -> a -> b Source #

bind :: (Traversable f, Num a) => (f (Forward a) -> b) -> f a -> f b Source #

bind' :: (Traversable f, Num a) => (f (Forward a) -> b) -> f a -> (b, f b) Source #

bindWith :: (Traversable f, Num a) => (a -> b -> c) -> (f (Forward a) -> b) -> f a -> f c Source #

bindWith' :: (Traversable f, Num a) => (a -> b -> c) -> (f (Forward a) -> b) -> f a -> (b, f c) Source #

transposeWith :: (Functor f, Foldable f, Traversable g) => (b -> f a -> c) -> f (g a) -> g b -> g c Source #