AutoDiff
PatWie opened this issue · comments
Patrick Wieschollek commented
Motivated by the fork of @tesch1 I tried some time ago to implement autodiff, too in
https://github.com/PatWie/CppNumericalSolvers/blob/autodiff/src/examples/debug.cpp
However, I observed that there is currently no neat way to switch from finite difference to autodiff within a one-liner and no overhead. While this is really just
AutoDiff<RosenbrockObjective, T> f_autodiff_version;
instead of
Rosenbrock<T> f_default;
It would affect all data inside the problem. Given quadratic form x'Ax
, even A
currently has to be represented using the dual type.