Two changes to how we manage user's state.

1. When Solver::Options::update_state_every_iteration = true,
   the StateUpdatingCallback only updates the state on a
   successful iteration. This works fine but will not work
   if the user provides an EvaluationCallback, because
   every call to Evaluator::Evaluate will change the state
   visible to the user. This means that on unsuccessful
   iterations when the user's IterationCallback is called
   the state visible to the user would be the last evaluation
   which did not lead to an improved cost. This CL forces
   the StateUpdatingCallback to unconditionally update
   the user visible state.

2. When the minimizer terminates, we update the user visible
   state only if the solution is usable, otherwise the user's
   state will remain the same. To maintain this invariant
   we will now cache the user's state and make sure we
   use it to reset it upon return if the solver is not
   successful.

Change-Id: Ic1f8fa6cb10d2753130ea752c70ff3d6b2f1462f
2 files changed
tree: 4952ba9060a66505b1d2c7ce98a225d8d7c864f8
  1. bazel/
  2. cmake/
  3. config/
  4. data/
  5. docs/
  6. examples/
  7. include/
  8. internal/
  9. jni/
  10. scripts/
  11. .gitignore
  12. BUILD
  13. CMakeLists.txt
  14. LICENSE
  15. package.xml
  16. README.md
  17. WORKSPACE
README.md

Ceres Solver

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.

  1. Non-linear Least Squares problems with bounds constraints.
  2. General unconstrained optimization problems.

Please see ceres-solver.org for more information.

WARNING - Do not make GitHub pull requests!

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