ad_fun

ADFun class - function object storing recorded AD operations

ADFun class - function object storing recorded AD operations

ADFun stores a recorded sequence of operations and provides methods to evaluate the function and its derivatives.

Key methods:

Algorithm

Forward mode computes derivatives in the direction of inputs. Reverse mode computes derivatives from outputs backward. Forward: O(n) per direction, Reverse: O(m) per output. Use forward when n < m, reverse when n > m.

See Also

Source

Header file: `include/cppad/core/ad_fun.hpp`