[modernize] Modernize internal autodiff and numeric_diff logic

Refactor the core automatic and numeric differentiation internal helpers
to utilize C++17 features for improved readability and maintainability:

- Added IntegerSequenceTraits to provide a uniform compile-time interface
  for accessing head and tail of std::integer_sequence.
- Eliminated recursive template meta-programming in autodiff.h, replacing
  it with fold expressions and std::index_sequence.
- Simplified core helper functions like Make1stOrderPerturbation into
  unrolled loops.
- Refactored EvaluateJacobianForParameterBlocks from a recursive struct
  to a recursive function template using if constexpr.
- Updated NumericDiffCostFunction and NumericDiffFirstOrderFunction
  to use the modernized internal helper API.

Change-Id: I934034f7434fc05a8855565b2b534d325f920584
4 files changed
tree: 40eee074730690ac2fd3e27cb9de3da72eb8ffee
  1. .github/
  2. bazel/
  3. cmake/
  4. config/
  5. data/
  6. docs/
  7. examples/
  8. include/
  9. internal/
  10. scripts/
  11. third_party/
  12. .clang-format
  13. .gitignore
  14. .gitmodules
  15. .readthedocs.yaml
  16. BUILD
  17. CITATION.cff
  18. CMakeLists.txt
  19. CONTRIBUTING.md
  20. LICENSE
  21. MODULE.bazel
  22. package.xml
  23. README.md
  24. WORKSPACE
README.md

Android Linux macOS Windows

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.