Copyright | (c) Edward Kmett 2010-2015 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- newtype Tower a = Tower {
- getTower :: [a]
- zeroPad :: Num a => [a] -> [a]
- zeroPadF :: (Functor f, Num a) => [f a] -> [f a]
- transposePadF :: (Foldable f, Functor f) => a -> f [a] -> [f a]
- d :: Num a => [a] -> a
- d' :: Num a => [a] -> (a, a)
- withD :: (a, a) -> Tower a
- tangents :: Tower a -> Tower a
- bundle :: a -> Tower a -> Tower a
- apply :: Num a => (Tower a -> b) -> a -> b
- getADTower :: Tower a -> [a]
- tower :: [a] -> Tower a
Documentation
Tower
is an AD Mode
that calculates a tangent tower by forward AD, and provides fast diffsUU
, diffsUF
Instances
(Num a, Bounded a) => Bounded (Tower a) Source # | |
(Num a, Enum a) => Enum (Tower a) Source # | |
(Num a, Eq a) => Eq (Tower a) Source # | |
Floating a => Floating (Tower a) Source # | |
Fractional a => Fractional (Tower a) Source # | |
Data a => Data (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tower a -> c (Tower a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tower a) # toConstr :: Tower a -> Constr # dataTypeOf :: Tower a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tower a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tower a)) # gmapT :: (forall b. Data b => b -> b) -> Tower a -> Tower a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tower a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tower a -> r # gmapQ :: (forall d. Data d => d -> u) -> Tower a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tower a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tower a -> m (Tower a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tower a -> m (Tower a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tower a -> m (Tower a) # | |
Num a => Num (Tower a) Source # | |
(Num a, Ord a) => Ord (Tower a) Source # | |
Real a => Real (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower toRational :: Tower a -> Rational # | |
RealFloat a => RealFloat (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower floatRadix :: Tower a -> Integer # floatDigits :: Tower a -> Int # floatRange :: Tower a -> (Int, Int) # decodeFloat :: Tower a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Tower a # significand :: Tower a -> Tower a # scaleFloat :: Int -> Tower a -> Tower a # isInfinite :: Tower a -> Bool # isDenormalized :: Tower a -> Bool # isNegativeZero :: Tower a -> Bool # | |
RealFrac a => RealFrac (Tower a) Source # | |
Show a => Show (Tower a) Source # | |
Erf a => Erf (Tower a) Source # | |
InvErf a => InvErf (Tower a) Source # | |
Num a => Mode (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower | |
Num a => Jacobian (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower unary :: (Scalar (Tower a) -> Scalar (Tower a)) -> D (Tower a) -> Tower a -> Tower a Source # lift1 :: (Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a)) -> Tower a -> Tower a Source # lift1_ :: (Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a) -> D (Tower a)) -> Tower a -> Tower a Source # binary :: (Scalar (Tower a) -> Scalar (Tower a) -> Scalar (Tower a)) -> D (Tower a) -> D (Tower a) -> Tower a -> Tower a -> Tower a Source # lift2 :: (Scalar (Tower a) -> Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a) -> (D (Tower a), D (Tower a))) -> Tower a -> Tower a -> Tower a Source # lift2_ :: (Scalar (Tower a) -> Scalar (Tower a) -> Scalar (Tower a)) -> (D (Tower a) -> D (Tower a) -> D (Tower a) -> (D (Tower a), D (Tower a))) -> Tower a -> Tower a -> Tower a Source # | |
type Scalar (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower | |
type D (Tower a) Source # | |
Defined in Numeric.AD.Internal.Tower |
transposePadF :: (Foldable f, Functor f) => a -> f [a] -> [f a] Source #
getADTower :: Tower a -> [a] Source #