ad-4.5.6: Automatic Differentiation
Copyright(c) Edward Kmett 2010-2021
LicenseBSD3
Maintainerekmett@gmail.com
Stabilityexperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.AD.Rank1.Dense.Representable

Description

Dense forward mode automatic differentiation with representable functors.

Synopsis

Documentation

data Repr f a Source #

Instances

Instances details
(Representable f, Num a) => Jacobian (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Associated Types

type D (Repr f a) Source #

Methods

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

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

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

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

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

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

(Representable f, Num a) => Mode (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Associated Types

type Scalar (Repr f a) Source #

Methods

isKnownConstant :: Repr f a -> Bool Source #

asKnownConstant :: Repr f a -> Maybe (Scalar (Repr f a)) Source #

isKnownZero :: Repr f a -> Bool Source #

auto :: Scalar (Repr f a) -> Repr f a Source #

(*^) :: Scalar (Repr f a) -> Repr f a -> Repr f a Source #

(^*) :: Repr f a -> Scalar (Repr f a) -> Repr f a Source #

(^/) :: Repr f a -> Scalar (Repr f a) -> Repr f a Source #

zero :: Repr f a Source #

(Representable f, Num a, Bounded a) => Bounded (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

minBound :: Repr f a #

maxBound :: Repr f a #

(Representable f, Num a, Enum a) => Enum (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

succ :: Repr f a -> Repr f a #

pred :: Repr f a -> Repr f a #

toEnum :: Int -> Repr f a #

fromEnum :: Repr f a -> Int #

enumFrom :: Repr f a -> [Repr f a] #

enumFromThen :: Repr f a -> Repr f a -> [Repr f a] #

enumFromTo :: Repr f a -> Repr f a -> [Repr f a] #

enumFromThenTo :: Repr f a -> Repr f a -> Repr f a -> [Repr f a] #

(Representable f, Floating a) => Floating (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

pi :: Repr f a #

exp :: Repr f a -> Repr f a #

log :: Repr f a -> Repr f a #

sqrt :: Repr f a -> Repr f a #

(**) :: Repr f a -> Repr f a -> Repr f a #

logBase :: Repr f a -> Repr f a -> Repr f a #

sin :: Repr f a -> Repr f a #

cos :: Repr f a -> Repr f a #

tan :: Repr f a -> Repr f a #

asin :: Repr f a -> Repr f a #

acos :: Repr f a -> Repr f a #

atan :: Repr f a -> Repr f a #

sinh :: Repr f a -> Repr f a #

cosh :: Repr f a -> Repr f a #

tanh :: Repr f a -> Repr f a #

asinh :: Repr f a -> Repr f a #

acosh :: Repr f a -> Repr f a #

atanh :: Repr f a -> Repr f a #

log1p :: Repr f a -> Repr f a #

expm1 :: Repr f a -> Repr f a #

log1pexp :: Repr f a -> Repr f a #

log1mexp :: Repr f a -> Repr f a #

(Representable f, RealFloat a) => RealFloat (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

floatRadix :: Repr f a -> Integer #

floatDigits :: Repr f a -> Int #

floatRange :: Repr f a -> (Int, Int) #

decodeFloat :: Repr f a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Repr f a #

exponent :: Repr f a -> Int #

significand :: Repr f a -> Repr f a #

scaleFloat :: Int -> Repr f a -> Repr f a #

isNaN :: Repr f a -> Bool #

isInfinite :: Repr f a -> Bool #

isDenormalized :: Repr f a -> Bool #

isNegativeZero :: Repr f a -> Bool #

isIEEE :: Repr f a -> Bool #

atan2 :: Repr f a -> Repr f a -> Repr f a #

(Representable f, Num a) => Num (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

(+) :: Repr f a -> Repr f a -> Repr f a #

(-) :: Repr f a -> Repr f a -> Repr f a #

(*) :: Repr f a -> Repr f a -> Repr f a #

negate :: Repr f a -> Repr f a #

abs :: Repr f a -> Repr f a #

signum :: Repr f a -> Repr f a #

fromInteger :: Integer -> Repr f a #

(Representable f, Fractional a) => Fractional (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

(/) :: Repr f a -> Repr f a -> Repr f a #

recip :: Repr f a -> Repr f a #

fromRational :: Rational -> Repr f a #

(Representable f, Real a) => Real (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

toRational :: Repr f a -> Rational #

(Representable f, RealFrac a) => RealFrac (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

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

truncate :: Integral b => Repr f a -> b #

round :: Integral b => Repr f a -> b #

ceiling :: Integral b => Repr f a -> b #

floor :: Integral b => Repr f a -> b #

Show a => Show (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

showsPrec :: Int -> Repr f a -> ShowS #

show :: Repr f a -> String #

showList :: [Repr f a] -> ShowS #

(Representable f, Erf a) => Erf (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

erf :: Repr f a -> Repr f a #

erfc :: Repr f a -> Repr f a #

erfcx :: Repr f a -> Repr f a #

normcdf :: Repr f a -> Repr f a #

(Representable f, InvErf a) => InvErf (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

inverf :: Repr f a -> Repr f a #

inverfc :: Repr f a -> Repr f a #

invnormcdf :: Repr f a -> Repr f a #

(Representable f, Num a, Eq a) => Eq (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

(==) :: Repr f a -> Repr f a -> Bool #

(/=) :: Repr f a -> Repr f a -> Bool #

(Representable f, Num a, Ord a) => Ord (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

Methods

compare :: Repr f a -> Repr f a -> Ordering #

(<) :: Repr f a -> Repr f a -> Bool #

(<=) :: Repr f a -> Repr f a -> Bool #

(>) :: Repr f a -> Repr f a -> Bool #

(>=) :: Repr f a -> Repr f a -> Bool #

max :: Repr f a -> Repr f a -> Repr f a #

min :: Repr f a -> Repr f a -> Repr f a #

type D (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

type D (Repr f a) = Id a
type Scalar (Repr f a) Source # 
Instance details

Defined in Numeric.AD.Internal.Dense.Representable

type Scalar (Repr f a) = a

auto :: Mode t => Scalar t -> t Source #

Embed a constant

Sparse Gradients

grad :: (Representable f, Eq (Rep f), Num a) => (f (Repr f a) -> Repr f a) -> f a -> f a Source #

grad' :: (Representable f, Eq (Rep f), Num a) => (f (Repr f a) -> Repr f a) -> f a -> (a, f a) Source #

gradWith :: (Representable f, Eq (Rep f), Num a) => (a -> a -> b) -> (f (Repr f a) -> Repr f a) -> f a -> f b Source #

gradWith' :: (Representable f, Eq (Rep f), Num a) => (a -> a -> b) -> (f (Repr f a) -> Repr f a) -> f a -> (a, f b) Source #

Sparse Jacobians (synonyms)

jacobian :: (Representable f, Eq (Rep f), Functor g, Num a) => (f (Repr f a) -> g (Repr f a)) -> f a -> g (f a) Source #

jacobian' :: (Representable f, Eq (Rep f), Functor g, Num a) => (f (Repr f a) -> g (Repr f a)) -> f a -> g (a, f a) Source #

jacobianWith :: (Representable f, Eq (Rep f), Functor g, Num a) => (a -> a -> b) -> (f (Repr f a) -> g (Repr f a)) -> f a -> g (f b) Source #

jacobianWith' :: (Representable f, Eq (Rep f), Functor g, Num a) => (a -> a -> b) -> (f (Repr f a) -> g (Repr f a)) -> f a -> g (a, f b) Source #