Copyright | (c) Edward Kmett 2010-2021 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | GHC only |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Higher order derivatives via a "dual number tower".
Synopsis
- data AD s a
- data TowerDouble
- auto :: Mode t => Scalar t -> t
- taylor :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double]
- taylor0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double]
- maclaurin :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
- maclaurin0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
- diff :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double
- diff' :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> (Double, Double)
- diffs :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
- diffs0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
- diffsF :: Functor f => (forall s. AD s TowerDouble -> f (AD s TowerDouble)) -> Double -> f [Double]
- diffs0F :: Functor f => (forall s. AD s TowerDouble -> f (AD s TowerDouble)) -> Double -> f [Double]
- du :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f (Double, Double) -> Double
- du' :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f (Double, Double) -> (Double, Double)
- dus :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f [Double] -> [Double]
- dus0 :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f [Double] -> [Double]
- duF :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f (Double, Double) -> g Double
- duF' :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f (Double, Double) -> g (Double, Double)
- dusF :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f [Double] -> g [Double]
- dus0F :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f [Double] -> g [Double]
Documentation
Instances
data TowerDouble Source #
Tower
is an AD Mode
that calculates a tangent tower by forward AD, and provides fast diffsUU
, diffsUF
Instances
Taylor Series
taylor :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double] Source #
taylor0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double] Source #
Maclaurin Series
maclaurin :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double] Source #
maclaurin0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double] Source #
Derivatives
diff :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double Source #
diff' :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> (Double, Double) Source #
diffs :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double] Source #
diffs0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double] Source #
diffsF :: Functor f => (forall s. AD s TowerDouble -> f (AD s TowerDouble)) -> Double -> f [Double] Source #
diffs0F :: Functor f => (forall s. AD s TowerDouble -> f (AD s TowerDouble)) -> Double -> f [Double] Source #
Directional Derivatives
du :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f (Double, Double) -> Double Source #
du' :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f (Double, Double) -> (Double, Double) Source #
dus :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f [Double] -> [Double] Source #
dus0 :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f [Double] -> [Double] Source #
duF :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f (Double, Double) -> g Double Source #
duF' :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f (Double, Double) -> g (Double, Double) Source #