You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We allow construction of sym::Factor objects from
functions which only calculate the residual and
jacobian.
There are many ways this could happen:
1) The user could construct it from a function calculating
fixed sized jacobians.
2) The user could construct it from a function calculating
dynamically sized jacobians.
3) The user could construct it from a function of a sym::Values
object.
In each of these scenarios, the only difference is in how you
get a hold of the jacobian and residual from which to calculate
the hessian and rhs. Once you have them, you follow the same steps.
Unfortunately, we calculated the same results 3 different times
(one for each scenario). Not only is this more verbose, but it
can also be easy to forget to update one of the scenarios. For
example, branch 3 still used an old method of calculating the
hessian from the jacobian. This was an oversight that was made
easy by the repition.
To address this issue, this commit factors out the calculation
into a single generic function which is called in each of the
3 locations.
Topic: 3_fold_hessian
GitOrigin-RevId: 5a77ee6cf475a495b168c59052f51444dc274106
0 commit comments