Portability | GHC only |
---|---|

Stability | experimental |

Maintainer | ekmett@gmail.com |

Dense Forward AD. Useful when the result involves the majority of the input
elements. Do not use for `Numeric.AD.Mode.Mixed.hessian`

and beyond, since
they only contain a small number of unique `n`

th derivatives --
`(n + k - 1) `

for functions of `choose`

k`k`

inputs rather than the
`k^n`

that would be generated by using `Dense`

, not to mention the redundant
intermediate derivatives that would be
calculated over and over during that process!

Assumes all instances of `f`

have the same number of elements.

NB: We don't need the full power of `Traversable`

here, we could get
by with a notion of zippable that can plug in 0's for the missing
entries. This might allow for gradients where `f`

has exponentials like `((->) a)`