Skip to main content

Crate sim_lib_numbers_ad

Crate sim_lib_numbers_ad 

Source
Expand description

Automatic differentiation primitives: forward-mode dual numbers, a reverse-mode evaluation tape, and the Scalarish numeric trait they share.

Structs§

Dual
A forward-mode dual number: a primal value paired with an N-slot gradient.
Tape
A reverse-mode autodiff tape: the recorded operation graph plus the forward value of each node.
Var
A handle to a node recorded on a Tape: its index into the tape.

Enums§

TapeNode
One recorded operation on a Tape.

Traits§

Scalarish
A minimal scalar numeric interface: the arithmetic operators plus a fixed set of elementary functions, shared by f64 and the autodiff number types.