Copyright | (c) Edward Kmett 2010-2015 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
AD modes
class (Num t, Num (Scalar t)) => Mode t where Source #
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
=lift
0
Mode Double Source # | |
Mode Float Source # | |
Mode Int Source # | |
Mode Int8 Source # | |
Mode Int16 Source # | |
Mode Int32 Source # | |
Mode Int64 Source # | |
Mode Integer Source # | |
Mode Word Source # | |
Mode Word8 Source # | |
Mode Word16 Source # | |
Mode Word32 Source # | |
Mode Word64 Source # | |
Mode Natural Source # | |
Mode ForwardDouble Source # | |
Integral a => Mode (Ratio a) Source # | |
RealFloat a => Mode (Complex a) Source # | |
Num a => Mode (Id a) Source # | |
Num a => Mode (Tower a) Source # | |
Num a => Mode (Sparse a) Source # | |
(Mode t, Mode (Scalar t)) => Mode (On t) Source # | |
Num a => Mode (Kahn a) Source # | |
Num a => Mode (Forward a) Source # | |
(Num a, Traversable f) => Mode (Dense f a) Source # | |
Mode a => Mode (AD s a) Source # | |
(Reifies * s Tape, Num a) => Mode (Reverse s a) Source # | |
(Mode a, Mode b, Chosen s, (~) * (Scalar a) (Scalar b)) => Mode (Or s a b) Source # | |