Expand description
Toolset for forward mode automatic differentiation (AD).
§AD Architecture
The entire rateslib library is built around three core numeric types: f64, Dual and Dual2. Obviously f64 allows for traditional computation, which benefits from efficient calculation leveraging BLAS, while Dual and Dual2 reduce performance of traditional calculation but provide efficient calculation of first order and second order derivatives, respectively. Derivatives are calculated using forward mode AD, similar, but not identical, to the Julia ForwardDiff library.
Mathematical operations are defined to give dual numbers the ability to combine, and flexibly reference different variables at any point during calculations.
Modules§
- docs
- Standalone documentation pages.
- linalg
- Perform linear algebra operations involving Arrays of f64, Dual and Dual2.
Structs§
- Dual
- A dual number data type supporting first order derivatives.
- Dual2
- A dual number data type supporting second order derivatives.
Enums§
- ADOrder
- Defines the order of gradients available in a calculation with AD.
- Number
- Container for the three core numeric types; f64, Dual and Dual2.
- Number
Array1 - Container for Array1 of each core numeric type.
- Number
Array2 - Container for Array2 of each core numeric type.
- NumberPP
Spline - Container for PPSpline definitive type variants.
- Number
Vec - Container for Vec of each core numeric type.
- Vars
Relationship - The state of the
vars
measured between two dual number type structs; a LHS relative to a RHS.
Traits§
- Gradient1
- Provides calculations of first order gradients to all, or a set of provided,
vars
. - Gradient2
- Provides calculations of second order gradients to all, or a set of provided,
vars
. - Math
Funcs - Functions for common mathematical operations.
- Number
Mapping - Generic trait indicating a function exists to map one Number to another.
- Number
Ops - Vars
- Manages the
vars
of the manifold associated with a dual number.
Functions§
- set_
order - Convert a
Number
of oneADOrder
to another and consume the value. - set_
order_ clone - Convert a
Number
of oneADOrder
to another.