Crate rust_ad[−][src]
Expand description
A restrictive WIP beginnings of a library attempting to implement auto-differentiation in Rust.
Status
This library is very much a WIP and thus extremely rough, temperamental and inconsistent.
I would not recommend you use it at the moment, it is only public to allow the possibility of collaborative work on it.
- Forward Auto-differentiation
- Reverse Auto-differentiation
-
f32&f64support* - ndarray support*
-
Non-primitive operations (specifically
ndarray::Array2::dot()) - nalgebra support*
-
if,if elseandelsesupport -
for,whileandloopsupport
*Becuase typeof (e.g. decltype) is currently not implemented in Rust this makes supporting different types and more complex operations a massive pain. E.g. to figure out what operation a + b is actually doing I need to figure out the types a and b. Currently I’m considering requiring the manual annotatation of all types, let a: f32 = b + c; instead of let a = b + c; etc.
Macros
Returns a tuple of a given number of clones of a variable.
Calls forward auto-differentiation function corresponding to a given function.
Calls reverse auto-differentiation function corresponding to a given function.
Attribute Macros
Generates the forward auto-differentiation function for a given function.
Generates the reverse auto-differentiation function for a given function.
Flattens nested binary expressions into separate variable assignments.
