module Numeric.AD.Mode.Tower
( AD
, Tower
, auto
, taylor
, taylor0
, maclaurin
, maclaurin0
, diff
, diff'
, diffs
, diffs0
, diffsF
, diffs0F
, du
, du'
, dus
, dus0
, duF
, duF'
, dusF
, dus0F
) where
import qualified Numeric.AD.Rank1.Tower as Rank1
import Numeric.AD.Internal.Tower (Tower)
import Numeric.AD.Internal.Type (AD(..))
import Numeric.AD.Mode
diffs :: Num a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> [a]
diffs f = Rank1.diffs (runAD.f.AD)
diffs0 :: Num a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> [a]
diffs0 f = Rank1.diffs0 (runAD.f.AD)
diffsF :: (Functor f, Num a) => (forall s. AD s (Tower a) -> f (AD s (Tower a))) -> a -> f [a]
diffsF f = Rank1.diffsF (fmap runAD.f.AD)
diffs0F :: (Functor f, Num a) => (forall s. AD s (Tower a) -> f (AD s (Tower a))) -> a -> f [a]
diffs0F f = Rank1.diffs0F (fmap runAD.f.AD)
taylor :: Fractional a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> a -> [a]
taylor f = Rank1.taylor (runAD.f.AD)
taylor0 :: Fractional a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> a -> [a]
taylor0 f = Rank1.taylor0 (runAD.f.AD)
maclaurin :: Fractional a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> [a]
maclaurin f = Rank1.maclaurin (runAD.f.AD)
maclaurin0 :: Fractional a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> [a]
maclaurin0 f = Rank1.maclaurin0 (runAD.f.AD)
diff :: Num a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> a
diff f = Rank1.diff (runAD.f.AD)
diff' :: Num a => (forall s. AD s (Tower a) -> AD s (Tower a)) -> a -> (a, a)
diff' f = Rank1.diff' (runAD.f.AD)
du :: (Functor f, Num a) => (forall s. f (AD s (Tower a)) -> AD s (Tower a)) -> f (a, a) -> a
du f = Rank1.du (runAD.f. fmap AD)
du' :: (Functor f, Num a) => (forall s. f (AD s (Tower a)) -> AD s (Tower a)) -> f (a, a) -> (a, a)
du' f = Rank1.du' (runAD.f.fmap AD)
duF :: (Functor f, Functor g, Num a) => (forall s. f (AD s (Tower a)) -> g (AD s (Tower a))) -> f (a, a) -> g a
duF f = Rank1.duF (fmap runAD.f.fmap AD)
duF' :: (Functor f, Functor g, Num a) => (forall s. f (AD s (Tower a)) -> g (AD s (Tower a))) -> f (a, a) -> g (a, a)
duF' f = Rank1.duF' (fmap runAD.f.fmap AD)
dus :: (Functor f, Num a) => (forall s. f (AD s (Tower a)) -> AD s (Tower a)) -> f [a] -> [a]
dus f = Rank1.dus (runAD.f.fmap AD)
dus0 :: (Functor f, Num a) => (forall s. f (AD s (Tower a)) -> AD s (Tower a)) -> f [a] -> [a]
dus0 f = Rank1.dus0 (runAD.f.fmap AD)
dusF :: (Functor f, Functor g, Num a) => (forall s. f (AD s (Tower a)) -> g (AD s (Tower a))) -> f [a] -> g [a]
dusF f = Rank1.dusF (fmap runAD.f.fmap AD)
dus0F :: (Functor f, Functor g, Num a) => (forall s. f (AD s (Tower a)) -> g (AD s (Tower a))) -> f [a] -> g [a]
dus0F f = Rank1.dus0F (fmap runAD.f.fmap AD)