downhill-0.4.0.0: Reverse mode automatic differentiation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Downhill.BVar.Prelude

Contents

Synopsis

Tuples

Pattern synonyms T2, T3 pack and unpack tuples:

fstBVar :: (HasGrad a, HasGrad b) => BVar r (a, b) -> BVar r a
fstBVar (T2 a _b) = a

tieBVar :: (HasGrad a, HasGrad b) => BVar r a -> BVar r b -> BVar r (a, b)
tieBVar a b = T2 a b

pattern T2 :: (HasGrad a, HasGrad b) => BVar r a -> BVar r b -> BVar r (a, b) Source #

pattern T3 :: (HasGrad a, HasGrad b, HasGrad c) => BVar r a -> BVar r b -> BVar r c -> BVar r (a, b, c) Source #