Trying to compute AutoDiff Hessians results in an assertion error (possibly a one character fix?)
Submitted by twa..@..il.com
Assigned to Nobody
Link to original bugzilla bug (#1063)
Description
Created attachment 603
Hessian example that causes an assertion error
This originates from https://forum.kde.org/viewtopic.php?f=74&t=112093
The example given by ralf.denzer still causes an assertion error in 3.2.5 as well as in the devel branch.
The fix given by pjsa seems to work still, i.e. replace
typedef AutoDiffScalar<DerType>& Nested;
with
typedef AutoDiffScalar<DerType> Nested;
in the NumTraits for AutoDiffScalar. So is this just the right fix for this problem?
For future reference, I've added ralf.denzer's example code that causes the assertion error.
Attachment 603, "Hessian example that causes an assertion error":
file_1063.txt
Edited by Eigen Bugzilla