Efficient automatic differentiation and code generation.
dvda == DVDA Verifiably Differentiates Algorithmically
This library provides a symbolic scalar type Dvda.Expr
which is manipulated mathematically through its Num/Fractional/Floating instances.
Automatic differentiation can be performed with Dvda.AD
. Expressions can be turned into computational graphs (FunGraph
s) using toFunGraph. This uses unsafe reification for performance reasons, and explicit common subexpression elimination using hashing can be performed using Dvda.CSE
FunGraph
s can be converted to C code and MATLAB mex functions. In the future there will be JIT compilation so you can call these functions efficiently from Haskell.
Pretty graphviz plots!
To get started check out the source for Dvda.Examples