commit | 2dd907744d83fd0bd3f58d1397be0a162f19a423 | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Sun Jan 15 15:46:56 2017 -0800 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Mon Jan 16 10:00:36 2017 -0800 |
tree | f8ea66339168bbbef82a3694edfb4e99ec699ac6 | |
parent | 7b4ec98ea9cd32be826365f37621f9232d95c15b [diff] |
Ensure that partial evaluation of residuals triggers an error ResidualBlock evaluation has logic to ensure that CostFunction should always fill out the residual and jacobian arrays completely by using a special value to pre-populate these arrays. This works for CostFunctions with analytical Jacobians but not for AutoDiffCostFunction and NumericDiffCostFunction Jacobians. There is no way to fix this for NumericDiffCostFunctions without introducing significant performance penalties but the residual evaluation fails, which should be enough to catch such errors. For AutoDiffCostFunction the way the Jets are default initialized was sidestepping this check. So now, the Jet that is used to capture the output residuals is now initialized with kImpossibleValue, which will ensure that if the user forgets to fill all output fields, it triggers an evaluation error. This change required that ceres::internal::kImpossibleValue be moved out of array_utils.h/cc to types.h. Change-Id: I35bb0946cf0785a5d43c7b5459a2272848fb2a9b
Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.
Please see ceres-solver.org for more information.
Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.
The upstream Gerrit repository is
https://ceres-solver.googlesource.com/ceres-solver