FactorAutodiff reimplementation: from pointers to mutable
Just an implementation detail. Since ceres requires evaluate()
to be const
. In FactorAutodiff
our implementation of the differentiation wanted to reuse the Jets
so the attributes were pointers to them. In this way, the Jets
could be changed in a const
function.
Anyway, I just discovered mutable
keyword that means exactly this if applied to an attribute: it can be changed in a const
method. So instead of this ugly workaround, code should be changed to mutable Jets
.